[docs] bug in tutorial 7.Input and Output
장동헌(DongHeon Jang)
tellamon at gmail.com
Thu Jun 28 15:40:29 CEST 2012
page : http://docs.python.org/tutorial/inputoutput.html
explanation :
>>> table = {'Sjoerd': 4127, 'Jack': 4098, 'Dcab': 7678}>>> for name, phone in table.items():... print '{0:10} ==> {1:10d}'.format(name, phone)...Jack ==> 4098Dcab ==> 7678Sjoerd ==> 4127
Above result should be the following. I believe 'table' is dictionary and
it's sorting the items based on key values.
Dcab -> 7678
Jack -> 4098
Sjoerd -> 4127
Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20120628/12e28d3f/attachment-0001.html>
More information about the docs
mailing list