I want to make a global list and I saved a value in my global list (def rand()
).
Whatever I save, my saved value doesnt include at another function except rand()
.
What am I missing?
sayi = []
def rand():
global sayi
initial = 1000
for i in range(1000,10000):
initial +=1
sayi.append(initial)
print sayi[43]
def main():
rand()
print len(sayi) # Shows 0 but I have added value at rand funct. with append funct.
main()