The boolean always comes out true no matter the inputs

Viewed 15

No matter the string I put, it never outputs false. Could you guys help me understand why and how do I fix it? Because I believe nothing is wrong with the code itself. The code is found below:

a = input('Enter True or False for a: ')

b = input('Enter True or False for b: ')

c = input('Enter True or False for c: ')

if (a == 'True' or 't' or 'T') and (b == 'True' or 't' or 'T') and (c == 'True' or 't' or 'T'):
    print(f'a and b and c: True')

else:
    print(f'a and b and c: False')
0 Answers
Related