remove key from dictionary in python, python dictionary, programming, #shorts #education #tutorial

preview_player
Показать описание
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}
Рекомендации по теме
welcome to shbcf.ru