dimanche 19 juillet 2020

Why is my if statement true when it should be false [duplicate]

My if statement is returning the wrong values:

for i in range (3325 , 3325+1):
    FSBRID = []
    for j in range(93, 94):
        a = ws1.cell(row=i, column=j)
        print(a.value)
        if 'SOIL' or 'soil' in a.value:
            print('wrong')

The returned values:

TISSUE 
wrong

Process finished with exit code 0

Aucun commentaire:

Enregistrer un commentaire