How would I reassign a value in a list every time i called it. For example in:
def randomfunction():
var1 = random.randint(1,10)
return var1
list1 = [None,None,None,None]
list1[1] = randomfunction()
How do I make the list[1] value equal to the randomfunction() rather than just one value returned by the function.
i.e everytime I call list[1] there is a new value from randomfunction().