my_dict = { 'employee_name' : 'Jeff' , 'job' : 'Teacher' , 'rank' : 10 , 'salary' : 6000 , 'favorite things' : [ 'polo' , 'horses' , 'movies about horses' ]} # dictionaries are made of keys with values print (my_dict) print (my_dict[ 'job' ]) # this prints out the item in the dict print (my_dict[ 'favorite things' ]) # this prints out the key which is a list within the dict my_dict2 = { 1 : 'Jeff' , 'job' : 'Teacher' , 'rank' : 10 , 'salary' : 6000 , 'favorite things' : [ 'polo' , 'horses' , 'movies about horses' ]} print (my_dict2[ 1 ]) # an integer can be a key print (my_dict2.get( 'job' )) # this will get the value of the key specified. my_dict2[ 'phone' ] = '555-5555' print (my_dict2) # notice that the phone value has been added to the dictionary my_di...
Comments