I want to check if the characters in any given string are listed in a dictionary of values (as keys) that i have created, how do I do this?
string = "hello" dictionary = {1:"h", 2:"e", 3:"q"} for c in string: if c in dictionary.values(): print(c, "in dictionary.values!")
If you wanted to check if c is in the keys, use dictionary.keys() instead.