dict.has_key(x) versus 'x in dict'

Peter Otten __peter__ at web.de
Wed Dec 6 11:53:09 EST 2006


Andy Dingley wrote:

>>     sorted(setBugsChanged)

> Out of interest, whats the Pythonic way to simply cast (sic) the set to
> a list, assuming I don't need it sorted?  The list comprehension?

list(setBugsChanged)

Peter



More information about the Python-list mailing list