0
Python Modules
import random for i in range(6): value=random.randint(1,51) print(value) is there a way i could modify this code make sure even if it prints random numbers it wont print one number twice...more like in lotto
2 Answers
+ 1
thanks lemme try that
0
import random
Last=0
def pp():
global Last
value=random.randint(1,51)
if (value != Last):
Last=value
print(value)
else:
pp()
for i in range(6):
pp()