Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

remove elements from dictionary python

squares = {1: 1, 2: 4, 3: 9, 4: 16, 5: 25}

# remove a particular item, returns its value
# Output: 16
print(squares.pop(4))
Source by xahlee.info #
 
PREVIOUS NEXT
Tagged: #remove #elements #dictionary #python
ADD COMMENT
Topic
Name
6+3 =