How To Find Keys and Values in a Python 3 Dictionary

preview_player
Показать описание

Be sure to like, share and comment to show your support for our tutorials.

=======================================
======================================

In this Python 3 Tutoria,l we take a look at finding key and values in a python dictionary. Being able to locate data in a dictionary is key to programming.
Рекомендации по теме
Комментарии
Автор

Thanks.
Just verified this.

d = {"a":123, "b":34, "c":304, "d":99}

for k, v in d.items():
if k == "a":
print(v)


for k, v in d.items():
if v == 123:
print(k)

bmanishap
Автор

First time viewer. Your clear explanations were awesome!

dvanosdorable
Автор

just wasted an hour of my life not realising that even if I was searching for a number I had to str() it. thanks.

iamalittleboat
Автор

Please make a video on calculating the number of a specific day (say sunday) between two dates using keys

mx.j
Автор

How to input values by choice, so later it can create a "data base"?

aleksandramilicevic
Автор

Dictionary is {'r': 2, 'e': 3, 'm': 2, 'b': 1}
For the above created dictionary there might be
several letters with similar count, create a new dictionary with
frequency as keys and values as list of characters with similar
frequencies.
New Dictionary:

srikanthvinjamuri
Автор

hello
I am trying to make a program where a user is asked to input the value to check whether it is present in a dictionary or not. Even after trying many times I couldn't succeed. please help
thanks in advance

arpitj_
Автор

How do you sum values in a hashmap by defining a new function ?? :)

curstinvisagie
Автор

How do you delete an item from a list that is a value in a dictionary?
Dictionary = {'key': [a, b, c, d]}
I want to delete 'b' only. How do I do that?

suzannacuypers
Автор

I couldn't help noticing your battery level, man. Get a charger!!

TheVnicius
visit shbcf.ru