I have a couple lists (raw data from elsewhere), that I collect in another list, to do stuff with later in the code. (So if I were to edit the raw data I am using, I can just change the original lists, edit the everything-list to reflect added/removed lists, and have all the subsequent code reflect those changes without me having to change anything in the rest of the code.)
Like so:
a=[1,2,3]
b=[55,9,18]
c=[15,234,2]
everything=[a,b,c]
At one point I would like to use the NAMES of my original lists ('a','b', and 'c' in my example). Is there a way for me to use my list 'everything' to access the names of the lists put in it?
(So for the code
for i in range(len(everything)):
print('The data from',???,'is',everything[i])
??? would be replaced by something to ideally print
The data from a is [1, 2, 3]
The data from b is [55, 9, 18]
The data from c is [15, 234, 2]
)