I'm looking for a way to do the following:
- I have a list composed of other lists:
TABLE=[table1,table2,table3] - I would like to duplicate this list but rename the sublists, such as:
TABLE_1=[table1_dup=list(table1),table2_dup=list(table2),table3_dup=list(table3)](this doesn't work; I'm just trying to explain my goal) so that I can access tablex and tablex_dup independently after performing batch operations on the whole TABLE and TABLE_1, which include table1, table2, ... and the duplicates.
Thanks a lot!
EDIT: The sublists aren't necessarily named the same (table1, table2, table3). Actually, their names are quite different (e.g. up, down, left, right)
EDIT #2: I'm kinda new to this. Basically, here's my code:
up=["img1.png","img2.png"]
similar things for down, left and right.
table=[up,down,left,right]
Now using pygame:
for j in range(len(table)):
for i in range(len(table[j])):
table[j][i] = pygame.image.load(os.path.join(str(table[j][i])))
table_r[j][i] = pygame.image.load(os.path.join(str(table_r[j][i])))
table_r[j][i] = pygame.transform.flip(table_r[j][i],1,0)
This wouldn't work as there is no up_r, for example, that I could access. Only up.