Minor edits to dictionaries.org.
authorSantosh Vattam <vattam@fossee.in>
Wed, 05 May 2010 19:18:30 +0530
changeset 121 331c5fdc06d4
parent 120 50716c7c4c0c
child 122 ed29ffa37cdc
child 123 ca292a5b83c7
child 125 27ddf1255daa
Minor edits to dictionaries.org.
dictionary.org
--- a/dictionary.org	Wed May 05 17:31:32 2010 +0530
+++ b/dictionary.org	Wed May 05 19:18:30 2010 +0530
@@ -22,6 +22,10 @@
 
     player = {'Mat': 134,'Inn': 233,
     'Runs': 10823, 'Avg': 52.53}
+    Let's see what player contains by typing:
+
+    print player
+
     Its a dictionary storing statistics of a cricket player.
     Here 'Mat', 'Inn' etc are the keys. Now in order to get the 'average' of
     this player we simply type
@@ -31,6 +35,7 @@
     To add a new key-value pair to this dictionary we type
     player['Name'] = 'Rahul Dravid'
     print player
+    As you can see the given key-value pair has been added.
     Please note that Python dictionaries don't maintain the order
     in which the key-value pairs are stored. The order might change
     as we add new entries.