Please help on this sorted function

fl rxjwg98 at gmail.com
Tue Jun 2 16:20:22 EDT 2015


Hi,

I try to learn sorted(). With the tutorial example:




>>> ff=sorted({1: 'D', 2: 'B', 3: 'B', 4: 'E', 5: 'A'})
>>> ff
[1, 2, 3, 4, 5]



I don't see what sorted does in this dictionary, i.e. the sequence of 
1..5 is unchanged. Could you explain it to me?


Thanks,



More information about the Python-list mailing list