I want to create a series of lists with unique names inside a for-loop and use the index to create the liste names. Here is what I want to do
x = [100,2,300,
Don't make dynamically named variables. It makes it hard to program with them. Instead, use a dict:
x = [100,2,300,4,75] dct = {} for i in x: dct['lst_%s' % i] = [] print(dct) # {'lst_300': [], 'lst_75': [], 'lst_100': [], 'lst_2': [], 'lst_4': []}