Avatar ·

Assignment of values ​​in Python. The difference in methods

📁 python, пример

Why are different results in 2 cases get?

Example 1:

  a =  1  b =  2  c =  3  d =  4  e =  5  f =  6  a, b, c, c, d = d = E, f, a, B  print  a, b, c, d, e, f    

result 1:

5 6 1 2 5 6

Example 2:

  a =  1  b = b = "  2  c =  3  d =  4  e =  5  f =  6  a = a = " EB = FC = AD = B  print  a, b, c, d, e, f    

result 2:

5 6 6 6 5 6 6

In what order, in the first example, the assignment of variables occurs?