1(x := 4) 2print(x) 3 4if x := 2: 5 print(True) 6print(x) 7 8print(4, x := 5) 9print(x) 10 11x = 1 12print(x, x := 5, x) 13print(x) 14 15 16def foo(): 17 print("any", any((hit := i) % 5 == 3 and (hit % 2) == 0 for i in range(10))) 18 return hit 19 20 21hit = 123 22print(foo()) 23print(hit) # shouldn't be changed by foo 24 25print("any", any((hit := i) % 5 == 3 and (hit % 2) == 0 for i in range(10))) 26print(hit) # should be changed by above 27 28print([((m := k + 1), k * m) for k in range(4)]) 29print(m) 30