_read_ = {}
_read_['time_list'] = [6000, 4000, 2000]
def abc(_read_):
time_list = _read_['time_list']
for i in range (0, 10):
if len(time_list) != 0:
print (time_list.pop())
else:
time_list = _read_['time_list']
abc(_wear_)
I'm trying to reinitialize the list(line 10), when it gets empty, with the same values as its being done in line 5 I was expecting the print to be
2000
4000
6000
2000
4000
6000
2000
4000
6000
2000
but I don't get anything after the first series is popped out i.e. the list does not get reinitialized