I have a list1 like below
list1 = ['mike', 'sam', 'paul', 'pam', 'lion']
One by one, I can specify a list name like below.
for item in list1:
for item in line:
mikelist = []
mikelist.append()
for item in list1:
for item in line:
samlist = []
samlist.append()
for item in list1:
for item in line:
paullist = []
paullist.append()
And so forth. Instead of specifying the name in the list to create new list and append, how do I take the item from the list1 and automatically create list in that for loop line here for all the items in list1?
for item in line:
namefromthelist = []
namefromthelist.append()