Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

remove first item form dictionary python

(k := next(iter(d)), d.pop(k))

which will return and remove the leftmost (first) item if it exists
 
PREVIOUS NEXT
Tagged: #remove #item #form #dictionary #python
ADD COMMENT
Topic
Name
7+2 =