






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Image Source: https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcSVkMx0ulre7iqizJ6FHgrwy2fjXrsuORsm5R9gq- caIe3pJHXa
phoneBook = {‘Mike’: 55555555} # ‘Mike’ is the key
print phoneBook[‘Mike’]
print phoneBook
phoneBook[‘Michelle’] = 43255322
print phoneBook
del phoneBook[‘Mike’]
entry with her key (‘Michelle’) and then simply re-assigning a new value. phoneBook[‘Michelle’] = 3252352
print phoneBook
for x in phoneBook: print x
the values.
wish them a happy
try to scam them!
for x in phoneBook: print phoneBook[x] ANOTHER LOOK AT THE DICTIONARY
THE TUPLE
samJones = (10,12)
nbaDictionary = {}
nbaDictionary['Sam Jones'] = samJones
THE CORRECT OUTPUT
GOING FURTHER