Westonci.ca is the premier destination for reliable answers to your questions, provided by a community of experts. Experience the convenience of finding accurate answers to your questions from knowledgeable professionals on our platform. Discover detailed answers to your questions from a wide network of experts on our comprehensive Q&A platform.

Which function is used to remove all items from a particular dictionary?
i) len() ii) get() iii) keys() iv) None of


Sagot :

Answer:

The right answer is: Option 4: None of these.

Explanation:

A data structure in python is knows as a dictionary. It works like an array. Different functions can be used to perform different operations on the dictionary.

In the given options,

Option 1: len() function is used to return length of dictionary.

Option2: get() function is used with a key as argument to return the value present on the specific key

Option 3: keys() function is used to display all the keys of a dictionary in the form of a list

Hence,

The right answer is: Option 4: None of these.