+ 1

Sololearn Python Challenge Question

a = [1,1,2,3,5,8] for a[1] in a: pass print(a) Output is [1,8,2,3,5,8] Why does this happen? I was under the impression that pass does nothing. As such, there should be no changes

18th Feb 2022, 6:08 PM
Wolfneck
Wolfneck - avatar
2 Answers
+ 1
Thanks for the explanation!
18th Feb 2022, 6:32 PM
Wolfneck
Wolfneck - avatar