Let's say we have a dict
dict = {
"a": "x",
"b": "x",
"c": "x",
"d": "y",
"e": "y",
"f": "y",
}
How do I quickly check, if a set of specific keys all have the same value?
E.g.:
list_of_keys = ["a", "b", "c"]
should return True.
list_of_keys = ["b", "c", "d"]
should return False
.
Thanks in advance.