Проверьте, содержит ли список какие-либо ключи dict
#python #list #dictionary Вопрос: d = {('shot',): ['V'], ('I',): ['NP']} s = ["I", "shot"] s1 = ["I"] s2 = ["shot"] print(str(tuple(s,))) print([i in d for i in tuple(s,)]) print(bool(set(tuple(s,)).intersection(d))) print(d[tuple(s1,)])…