Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

orderd dictionary pop vs del

pop returns the value of deleted key.
Basically, d.pop(key) evaluates as x = d[key]; del d[key]; return x.

Use pop when you need to know the value of deleted key
Use del otherwise
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #orderd #dictionary #pop #del
ADD COMMENT
Topic
Name
1+8 =