CBSE Class 11 Computer Science
Question 6 of 88
Tuples and Dictionary — Question 6
Back to all questions 6
Question Assertion (A): The pop() method can be used to delete elements from a dictionary.
Reasoning (R): The pop() method deletes the key-value pair and returns the value of deleted element.
- 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.
Both A and R are true and R is the correct explanation of A.
Explanation
The pop() method is used to delete elements from a dictionary. This method not only deletes the item specified by the key from the dictionary but also returns the deleted value.