I have this code(example):
count = 3
def test(count):
a = 1
while a <= count:
global list + str(a)
list + str(a) = []
print(a)
a += 1
test(count)
print(list1)
print(list2)
print(list3)
How can I create dynamically global variable(list) in function? I need to make my code working, need access to variables(lists): "list1", "list2" and "list3" from function outside.
Thanks