+ 1

Py in range

Please explain output : a=[2,4,5] for i in range(1,3): a[i]=a[i-1] print(a[i],end="") output 22?

30th Jan 2020, 2:39 AM
Gustave A C/D C ☢️ 🛸🛸🛸
Gustave A C/D C ☢️ 🛸🛸🛸 - avatar
1 Answer
+ 3
So in the first line a[1]=2; and in the second line after a[2]=a[1]=2 repeats the same value????? same pattern??
30th Jan 2020, 7:36 PM
Gustave A C/D C ☢️ 🛸🛸🛸
Gustave A C/D C ☢️ 🛸🛸🛸 - avatar