Re: [Tutor] [tutor] dictionary

2006-06-07 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > how can i print a dictionary, sorted by the values? A dictionary itself is an unordered collection and can't be sorted. But you can sort and print the list of key, value pairs returned by dict.items(). For example: In [3]: from operator import itemgetter In [4]: d =

[Tutor] [tutor] dictionary

2006-06-06 Thread emilia12
Hi, how can i print a dictionary, sorted by the values? - Поличба 666. Само в кината. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor