Re: pop method question



Steven D'Aprano <steve@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
...
while some_dict:
do_something_with(some_dict.pop())

doesn't work. Instead you have to write this:

You have to use .popitem for this -- that's what's it's for...


Alex
.