Home / Python Tips Generated By ChatGPT / The in Operator in Python Check if an item exists in a list or a key exists in a dictionary. Source Code # In a list print(1 in [1, 2, 3]) # In a dictionary print("name" in {"name": "Alice", "age": 25})