pythonでの集合処理で全てのkeyが結果として出てしまう python3 valuekey key drinks = { "martini": {"vodka", "vermouth"}, "black russian": {"vodka", "kahlua"}, "white russian": {"cream", "kahlua", "vodka"}, "manhattan": {"rye", "vermouth", "bitters"}, "screwdriver": {"orange juice", "vodka"} } for key, value in drinks.items(): if "vermouth" or "orange juice" in value: print(key)
`if ("vermouth") or ("orange juice" in value):``True``print`
xcX3v84RxoQ-4GxG32940ukFUIEgYdPy
ca74d919d6be8d9b42ada4e2f79b4d48
Stop