At 10:30 AM 9/18/2005, Kent Johnson wrote:
>Marcin Komorowski wrote:
> > I know that one of the ways to iterate over sorted dictionary keys is:
> > keylist = dictionary.keys()
> > keylist.sort()
> > for key in keylist:
> > ...
> >
> > Is there a way to do this in a single line.
On 19/09/05, Marcin Komorowski <[EMAIL PROTECTED]> wrote:
> Is there a way to do this in a single line. Something like this would be
> ideal:
> for key in dictionary.keys().soft():
Hi Marcin,
Others have already answered you, but just to follow up:
There is a reason why lst.sort() returns
Marcin Komorowski wrote:
> I know that one of the ways to iterate over sorted dictionary keys is:
> keylist = dictionary.keys()
> keylist.sort()
> for key in keylist:
> ...
>
> Is there a way to do this in a single line. Something like this would
> be ideal:
> for key in
Dnia niedziela, 18 września 2005 19:20, Marcin Komorowski napisał:
> I know that one of the ways to iterate over sorted dictionary keys is:
> keylist = dictionary.keys()
> keylist.sort()
> for key in keylist:
> ...
Indeed, 'sort' sorts its argument in-place and returns 'none'.
I know that one of the ways to
iterate over sorted dictionary keys is:
keylist =
dictionary.keys()
keylist.sort()
for key in
keylist:
...
Is there a way to do this in a single
line. Something like this would be ideal:
for key in
dictionary.keys().soft():