Say i have 2 strings that both contain the letter B, How would i check to confirm that both strings contain the same letter?
I tried doing:
myString1 = 'JILL'
myString2 = 'BOB'
if 'B' or 'K' in myString1 and myString2:
print('both strings contain the same letter')
The print statement is still reached even though myString1 does not contain the letters K or B.
I would think that the "and" operator would be like saying both variables need to contain the same letter for the print statement to be reached but this is not the case, Instead the print statement is always reached regardless of weather or not both strings contain the same letter.