[Solved] Python declare multiple lists


You can use a dictionary to store the values:

x=['aze','qsd','frz',...]
vars = {}
for i in x:
    vars["MAX" + i] = []

Or in order for them to become real variables you can add them to globals:

x=['aze','qsd','frz',...]
for i in x:
    globals()["MAX" + i] = []

You can now use:

MAXaze = [1,2,3]

3

solved Python declare multiple lists