[Tutor] Curious dictionary printing
Walter Prins
wprins at gmail.com
Mon May 7 19:56:20 CEST 2012
Hi,
On 7 May 2012 18:16, Cranky Frankie <cranky.frankie at gmail.com> wrote:
> In 3.2.2 in IDLE I have this dictionary entry:
>
> Namath = {"first_name": "Joe", "last_name": "Namath", "phone": "
> 212-222-7777",\
> "email": "joe.namath at gmail.com", "stadium": "Shea Stadium"}
>
> Why is it out of order?
Python dictionaries (unlike real physical language dictionaries), are not
ordered, and should be thought of as "an unordered set of *key:
value*pairs"[1]
Walter
[1] http://docs.python.org/tutorial/datastructures.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120507/3de96af9/attachment.html>
More information about the Tutor
mailing list