What is the explanation for this behavior in Python?
a = 10 b = 20 a and b # 20 b and a # 10
a and b evaluates to 20, while
a and b
In python everything that is not None, 0, False, "", [], (), {} is True
a and b is readed as True and True in this case the same for b and a
and yes in this case it takes the first value
edit: incomplete as in the comments