Answers for "check if item in dictionary value equal * something python"

1

check if dict key contains specific key and value

if (key, value) in d.items():
	print("yes")
Posted by: Guest on November-16-2020
1

if key in dictionary python

dict = {"key1": 1, "key2": 2}
if "key1" in dict:
 	print dict["key1]
>> 1
Posted by: Guest on October-07-2021

Code answers related to "check if item in dictionary value equal * something python"

Browse Popular Code Answers by Language