Weird errors when trying to access a dictionary key

robinsiebler at gmail.com robinsiebler at gmail.com
Fri Jul 20 15:43:33 EDT 2007


> You are converting the dictionary to a list on this line, and lists do
> not have keys>                             rpt_file.writelines('\t' + [song].keys() \
>
How am I converting it to a list?


> Note the first line has braces, not brackets so it is a
> dictionary.  

Braces?  What 1st line are you talking about?




More information about the Python-list mailing list