Hi:
Can you please explain __getitem__? My understanding is that it brings back
dictionary's value. Is this correct? If so which value does it bring? Does it
look up this value by using a key? Where is this key specified in "
numbers.__getitem__" ?
The below supposedly brings back dictionary's keys list sorted by values. But
how does it do it?
numbers = {'first': 1, 'second': 2, 'third': 3, 'Fourth': 4}
sorted(numbers, key=numbers.__getitem__)
Thank you very much
Monika
____________________________________________________________
3 Signs You May Have a Fatty Liver [Watch]
livecellresearch.com
http://thirdpartyoffers.netzero.net/TGL3241/583532f442b7c32f440b1st04duc
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor