Live Engine
Select Topic
easyNon Linear Data Structures
A developer checks whether a value is present in a dict using the in operator. What does this print, and what does in actually test on a dict?
Code
config = {"model": "bert", "lr": 0.001, "epochs": 10}
print("model" in config)
print(0.001 in config)
print("bert" in config)
print(0.001 in config.values())
print(("model", "bert") in config.items())