i have a list of names:
listA = ('bored','bob','ben','bill')
i'd like to ask if its possible to create X different lists from the names of is listA?
example:
bored = []
bob = []
ben = []
bill = []
i tried this code but i'm not sure it works:
listA = ('bored','bob','ben','bill')
for names in listA:
lName = 'list_' +str(names)
exec(lName+ '=[]')
exec('print '+ lName)
I would greatly appreciate any help on this... thanks in advance!
my list (listA) came first, i'd like to know if its possible to create new lists with names using the string data in listA.