type del colors["sam"and press enter python removes sam' entry from the dictionary repeat steps and you verify that sam' entry is actually gone type len(colorsand press enter the output value of verifies that the dictionary contains only three entries nowrather than type colors clearand press enter type len(colorsand press enter python reports that colors has entriesso the dictionary is now empty close the python shell window replacing the switch statement with dictionary most programming languages provide some sort of switch statement switch statement provides for elegant menu type selections the user has number of options but is allowed to choose only one of them the program takes some course of action based on the user selection here is some representative code (it won' executeof switch statement you might find in another languageswitch(ncase print("you selected blue ")breakcase print("you selected yellow ")breakcase print("you selected green ")breakthe application normally presents menu-type interfaceobtains the number of the selection from the userand then chooses the correct course of action from the switch statement it' straightforward and much neater than using series of if statements to accomplish the same task