S
Steve Pinard
(Got a comm error trying to post first time, sorry if this
is a duplicate)
New to Python, so please bear with me.
According to my reference (Nutshell), keys() returns a
"copy" of the dict keys as a list, so I would expect when
I aply sort() to that list, I would get an in-place sorted
version of that list. Why do I get None?
TIA,
- Steve
is a duplicate)
New to Python, so please bear with me.
Noneimport sys
print sys.modules.keys() # works fine ['code', ...snip... ]
print sys.modules.keys().sort() # returns None, why?
According to my reference (Nutshell), keys() returns a
"copy" of the dict keys as a list, so I would expect when
I aply sort() to that list, I would get an in-place sorted
version of that list. Why do I get None?
TIA,
- Steve