I have the following variables:
info0=["info01","info02","info03","info04",]
info1=["info11","info12","info13","info14",]
info2=["info21","info22","info23","info24",]
info3=["info31","info32","info33","info34",]
info4=["info41","info42","info43","info44",]
info5=["info51","info52","info53","info54",]
and I have the following function that prints the elements of a list:
def printelements(list_of_i):
for element in list_of_i:
print(element)
so I want to create a loop to go thought all the lists above and print all the elements:
for i in range(0,5):
printelements(info(i)) <-- so the function should change based on the i, in order to print all the lists
How can I do the above? I know alternative ways to print the lists, but I want to focus on the variable to change based on the i
.