Nov-04-2024, 05:55 PM
I'm just learning to code right now and Im experimenting with For Loops.
I tried this 2 options that I thought are the same but a get different results.
Anybody can tell me what the difference is?
I tried this 2 options that I thought are the same but a get different results.
Anybody can tell me what the difference is?
a, b = 0, 1 for i in range(10): print(a) a, b = b, a+b
a = 0 b = 1 for i in range(10): print(a) a = b b = a + b