Remove a key from a Dictionary in Python

Опубликовано: 22 Ноябрь 2016
на канале: The American Developer
385
0

PLEASE COMMENT, SUBSCRIBE, AND SHARE!!!
Inspired by this stackoverflow link: http://stackoverflow.com/questions/11...

Source code for this simple video:
Create a dictionary
form1 = {"Name":"Steve", "Age":18, "College":"MIT"}

Test for dictionary
print form1

Remove key from dictionary
form1.pop("College", None)

Test to see if key has been deleted from dictionary
print form1