Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- firstDict = {1:"five", 2:"ten", 3:"fifteen", 4:"twenty"}
- print(firstDict)
- inputKeyToDelete = input("Please enter a key whose corresponding value you wish to delete: ")
- if inputKeyToDelete in firstDict:
- firstDict.pop(inputKeyToDelete)
- print(firstDict)
- inputKeyToDelete = int(input("Please enter a key whose corresponding value you wish to delete: "))
Add Comment
Please, Sign In to add comment