ich steh grad voll auf dem Schlauch. Warum führt Python den Print-Befehl bei
Code: Alles auswählen
y = "hallo"
if ("x" and "h") in y:
print "found"
Code: Alles auswählen
y = "hallo"
if ("h" and "x") in y:
print "found"
Code: Alles auswählen
y = "hallo"
if ("x" and "h") in y:
print "found"
Code: Alles auswählen
y = "hallo"
if ("h" and "x") in y:
print "found"
Code: Alles auswählen
("x" and "h") in yCode: Alles auswählen
(True and "h") in yCode: Alles auswählen
(True and True) in yCode: Alles auswählen
True in yCode: Alles auswählen
FalseCode: Alles auswählen
"x" in y and "h" in yCode: Alles auswählen
In [137]: "x" and "h"
Out[137]: 'h'
In [138]: "h" and "x"
Out[138]: 'x'