use comments to tell us which method or operator you are figuring out in each part of your code). Assume that d is a dictionary that was initialized as: d = ‘Name’ : ‘Zara’ , ‘Age’: 7, ‘Class’: ‘First’ And reinitialize the dictionary for each method. - del d[”Name”] - d.clear() - del d - len(d) - d.values() - d.keys() - d.items()
1- Given a dictionary: capitals= {'CHINA': 'BEIJING','CUBA': 'HAVANA', 'USA': 'WASHINGTON, D.C.'} Write a Python script to check whether a given key already exists in a dictionary.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here