Can I create multiple lists using loop? What I want to achieve is create several lists For eg:
lt_1 = []
lt_2 = []
lt_3 = []
......
and later add items in each list separately. I tried naming every list as above but with 20 lists named separately, it didn't look nice. So I tried using for loop but with no success. The solution given here suggested using dictionary but then I couldn't append items in each list. Also I actually want to create separate list (if possible) so I can work with each element within each list.
I tried the following way (which obviously won't work) but what I want to do is pass the 'z' in lt_z as the looping variable and not variable name (Hope this makes sense)
for z in range(0,20):
lt_z = []
P.S. I am just beginning to learn python so I might have missed something while trying the solution with dictionary.