SyntaxFix
Write A Post
Hire A Developer
Questions
Use the random module: http://docs.python.org/library/random.html
random
import random random.sample(set([1, 2, 3, 4, 5, 6]), 2)
This samples the two values without replacement (so the two values are different).