remove key from dictionary in python, python dictionary, programming,

Published: 13 February 2022
on channel: Mangesh Bagul
10,989
103

d = {'a':10,'b':30,'c':50}

remove the key 'b' from dictionary d
Expected Output-: {'a':10,'c':50}


code:
d = {'a':10,'b':30,'c':50}


del d['b']


print(d)


output:
{'a': 10, 'c': 50}


On this page of the site you can watch the video online remove key from dictionary in python, python dictionary, programming, with a duration of hours minute second in good quality, which was uploaded by the user Mangesh Bagul 13 February 2022, share the link with friends and acquaintances, this video has already been watched 10,989 times on youtube and it was liked by 103 viewers. Enjoy your viewing!