Remove a key from a Dictionary in Python

Published: 22 November 2016
on channel: The American Developer
387
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


On this page of the site you can watch the video online Remove a key from a Dictionary in Python with a duration of hours minute second in good quality, which was uploaded by the user The American Developer 22 November 2016, share the link with friends and acquaintances, this video has already been watched 387 times on youtube and it was liked by 0 viewers. Enjoy your viewing!