Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (13 sloc) 332 Bytes
dict = {'one':1,'two':2,'three':3,'four':4,'five':5,'six':6,'seven':7,'eight':8,'nine':9,'ten':10}
print("Current Dictionary : ",dict)
key_to_delete = input("Enter the key to delete : ")
if key_to_delete in dict:
del dict[key_to_delete]
else :
print("Please enter a valid key.")
print("Final Dictionary ",dict)
You can’t perform that action at this time.