Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+6 votes

So in Q9 of the Concept practice, we are introduced to the .pop('key'). Is this the same thing as del dict['key']? What is the benefit of using this over del?

asked in CSC201 Spring 2021 by (1.6k points)

1 Answer

+5 votes
 
Best answer

It basically removes the specified key and it’s value. If there is no parameters specified it removes the last key and value.

answered by (1.8k points)
selected by
...