McqMate
Q. |
If a is a dictionary with some key-value pairs, what does a.popitem() do? |
A. | removes an arbitrary element |
B. | removes all the key-value pairs |
C. | removes the key-value pair for the key given as an argument |
D. | invalid method for dictionary |
Answer» A. removes an arbitrary element | |
Explanation: the method popitem() removes a random key-value pair. |
View all MCQs in
Problem Solving and Python ProgrammingNo comments yet