How to get unique numbers using randomint python?
- by user2519572
I am creating a 'Euromillions Lottery generator' just for fun and I keep getting the same numbers printing out. How can I make it so that I get random numbers and never get the same number popping up:
from random import randint
numbers = randint(1,50)
stars = randint(1,11)
print "Your lucky numbers are: ", numbers, numbers, numbers, numbers, numbers
print "Your lucky stars are: " , stars, stars
The output is just:
>>> Your lucky numbers are: 41 41 41 41 41
>>> Your lucky stars are: 8 8
>>> Good bye!
How can I fix this?
Regards