I want to make some list, each one named as an element in another list.
Input:
["A","B","C"]
The output that I want:
A = []
B = []
C = []
I want to make some list, each one named as an element in another list.
Input:
["A","B","C"]
The output that I want:
A = []
B = []
C = []
While this can be done by modifying the vars()
dict, I would suggest just using a separate dict for that:
lists = dict()
names = ["A","B","C"]
for name in names:
lists[name] = []