Answers for "check if key contains in dict django"

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 key contains in dict django"

Browse Popular Code Answers by Language