I have a several lists with items inside:
a = [1,2,3,4]
b = [5,6,7,8]
c = [9,10,11,12]
Also I have another list with names of lists saved as strings:
names = ['a', 'b', 'c']
I want to print items from those lists (a,b,c) using name from list names in a loop (smt. like this):
for i in names:
print(i)
And the output will be:
'a'
'b'
'c'
But I want to get:
[1,2,3,4]
[5,6,7,8]
[9,10,11,12]
I need to convert strings to variables in a loop somehow.