Guest User

Untitled

a guest
Jan 16th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. firstDict = {1:"five", 2:"ten", 3:"fifteen", 4:"twenty"}
  2. print(firstDict)
  3. inputKeyToDelete = input("Please enter a key whose corresponding value you wish to delete: ")
  4. if inputKeyToDelete in firstDict:
  5. firstDict.pop(inputKeyToDelete)
  6. print(firstDict)
  7.  
  8. inputKeyToDelete = int(input("Please enter a key whose corresponding value you wish to delete: "))
Add Comment
Please, Sign In to add comment