CBSE Class 11 Computer Science
Question 8 of 88
Tuples and Dictionary — Question 8
Back to all questions 8
Question Assertion (A): clear() method removes all elements from the dictionary.
Reasoning (R): len() function cannot be used to find the length of a dictionary.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
A is true but R is false.
Explanation
The clear() method removes all items from the particular dictionary and returns an empty dictionary. The len() method returns the length of key-value pairs in the given dictionary.