P
Paul Rubin
Colin J. Williams said:# print [mydict[x] for x in sorted(mydict.keys)] Instance object
is not iterable
It was a typo. Use:
print [mydict[x] for x in sorted(mydict.keys())]
Colin J. Williams said:# print [mydict[x] for x in sorted(mydict.keys)] Instance object
is not iterable
Colin J. Williams said:# print [mydict[x] for x in sorted(mydict.keys)] Instance object
is not iterable
It was a typo. Use:
print [mydict[x] for x in sorted(mydict.keys())]
Michele said:It was a typo. Use:Colin J. Williams said:# print [mydict[x] for x in sorted(mydict.keys)] Instance object
is not iterable
print [mydict[x] for x in sorted(mydict.keys())]
Even better
print [mydict[x] for x in sorted(mydict)]
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.