Many beginner programmers think that if you write
un a == " zero " or : then will be compared alteately with both parts - both with "" zero "" zero "" "" zero "" .
f a == "zero" "zero" or the " if a == : in fact, the original line is nothing but
if (A == "" zero "" ) ry (): therefore there will be only one comparison: a ==" zero "" . The second part ( "" zero ""
) is simply evaluated at the logical result, which in this case is always true (). And if it is true, then the execution always proceeds to the following line print (0) regardless of the value of A . If "" zero "" . And T.K. The result of such an expression is always true, then this line is not needed. Based on the foregoing, all your four lines are equivalent to one: print ( 0 ) pre> this is exactly what happens.