我正在创建一个“Euromillions 彩票生成器”只是为了好玩,而且我不断打印出相同的数字。我怎样才能使我得到随机数并且永远不会弹出相同的数字:
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
输出只是:
>>> Your lucky numbers are: 41 41 41 41 41
>>> Your lucky stars are: 8 8
>>> Good bye!
我怎样才能解决这个问题?
问候