diff --git a/native-datatypes.html b/native-datatypes.html index 88865f7..07a773b 100644 --- a/native-datatypes.html +++ b/native-datatypes.html @@ -453,14 +453,14 @@ IndexError: pop from empty list

Creating A Dictionary

Creating a dictionary is easy. The syntax is similar to sets [FIXME link fails because section is not written yet], but instead of values, you have key-value pairs. Once you have a dictionary, you can look up values by their key.

->>> a_dict = {'server':'db.diveintopython3.org', 'database':'mysql'}  
+>>> a_dict = {'server': 'db.diveintopython3.org', 'database': 'mysql'}  
 >>> a_dict
 {'server': 'db.diveintopython3.org', 'database': 'mysql'}
->>> a_dict['server']                                                  
+>>> a_dict['server']                                                    
 'db.diveintopython3.org'
->>> a_dict['database']                                                
+>>> a_dict['database']                                                  
 'mysql'
->>> a_dict['db.diveintopython3.org']                                  
+>>> a_dict['db.diveintopython3.org']                                    
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
 KeyError: 'db.diveintopython3.org'