python if any value in dict code example
Example 1: check if dict key contains specific key and value
if (key, value) in d.items():
print("yes")
Example 2: python dictionary contains key
if key in dictionary:
print(True)
if (key, value) in d.items():
print("yes")
if key in dictionary:
print(True)