diff --git a/README.md b/README.md index f8525fc..715d367 100644 --- a/README.md +++ b/README.md @@ -281,7 +281,7 @@ my_dict.pop('name', None) ```python my_dict.update({'cool': True}) # {'name': 'Andrei Neagoie', 'age': 30, 'magic_power': False, 'favourite_snack': 'Grapes', 'cool': True} -{**my_dict, **{'cool': True} } # {'name': 'Andrei Neagoie', 'age': 30, 'magic_power': False, 'favourite_snack': 'Grapes', 'cool': True} +{**my_dict, 'cool': True} # {'name': 'Andrei Neagoie', 'age': 30, 'magic_power': False, 'favourite_snack': 'Grapes', 'cool': True} new_dict = dict([['name','Andrei'],['age',32],['magic_power',False]]) # Creates a dict from collection of key-value pairs. new_dict = dict(zip(['name','age','magic_power'],['Andrei',32, False]))# Creates a dict from two collections. new_dict = my_dict.pop('favourite_snack') # Removes item from dictionary.