I'm trying to make a list where each time a random item from the list is chosen it gives the number to the define of lwr() that makes it a random radiant. I was hoping there would be a way of accomplishing this while still using the define lwr() to give the random radiant. Though I cant get the random radiant to change each time when the same list item is given
import random
def lwr(start,end):
y = ((random.randint(start,end)))
return y
list =[lwr(1,10)]
print(random.choice(list))
print(random.choice(list))
print(random.choice(list))
Current Output(example): 4 4 4
Desired Output(example): 6 3 7
Aucun commentaire:
Enregistrer un commentaire