Using String for new List name

Terry Reedy tjreedy at udel.edu
Mon Sep 28 14:40:45 EDT 2009


Scott wrote:
> Thank you fine folks for getting back with your answers!
> 
> So down the road I do dictname[line42].append("new stuff").

The keys are strings, so

dictname['line42'].append("new stuff")

or

for key in dictname.keys():
   ...
   dictname[key]....

tjr




More information about the Python-list mailing list