149k views
16 votes
Which function is used to remove all items from a particular dictionary?

i) len() ii) get() iii) keys() iv) None of

User Agasthyan
by
4.8k points

1 Answer

11 votes

Answer:

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

Step-by-step 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.

User Kitokid
by
5.8k points