"[0, 2, 1] [0, 1, 2] [0, 1, 2]".
I changed the code to three "print(f())" on three separate lines. Then I got
"[0]
[0, 1]
[0, 1, 2]"
So, clearly f() was called three times but only the last value was used.
Python 3.14.2.
"[0, 2, 1] [0, 1, 2] [0, 1, 2]".
I changed the code to three "print(f())" on three separate lines. Then I got
"[0]
[0, 1]
[0, 1, 2]"
So, clearly f() was called three times but only the last value was used.
Python 3.14.2.