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 y
Code: Alles auswählen
(True and "h") in y
Code: Alles auswählen
(True and True) in y
Code: Alles auswählen
True in y
Code: Alles auswählen
False
Code: Alles auswählen
"x" in y and "h" in y
Code: Alles auswählen
In [137]: "x" and "h"
Out[137]: 'h'
In [138]: "h" and "x"
Out[138]: 'x'