How-to's and technical news about Linux and open computing, with a sprinkling of Python.
In [1]: d = {'a':10, 'b': 20, 'c': 30}In [2]: for key,value in d.iteritems(): ...: print key, value ...:a 10c 30b 20
In [3]: for key,value in sorted(d.iteritems()): ...: print value ...:a 10b 20c 30
Note: Only a member of this blog may post a comment.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.