I have a question about the use of “not” here, and how it interacts with the use of “in”.
For starters, if I try to put “not” after “in” as in:
if letter in not string_two and empty_list:
I get a syntax error. I would like to understand the functionality of “not” better so I know what it"s supposed to do, when I can use it, and when I can"t.
Thank you very much.
PS. I would also like to learn how to format my code in these posts. I would be grateful if you could point me to a guide or anything that could show me how to do that.
def common_letters(string_one, string_two):
for letter in string_one:
if letter in string_two and not empty_list: