I am working on a program that store information in different lists using globals. The numer of lists changes everytime the program runs. I want to use the data stored in those lists but don't know how. In the program below I created 3 lists and I want to print it on the screen but it does not work:
k = 3
i = 1
L_1 = [1,2,3,4,5]
L_2 = [3,4,5,6,6]
L_3 = [6,7,1,5,2]
while True:
print(L_[i]) #the error is here because I don't know how to recall the list
i =i + 1
if i == k:
break
PS: It would be easier to write in this case print(L_1), print(L_2), print(L_3) but in the real program I am working on you can never know how many lists the user is going to create.
Thank you very much in advanced