0

Array python

Can somebody explain below code In :- a=[2,4,5] For i in range(1,3): a[i] = a[i-1] Print(a[i], end = ") Out:- 22

24th Jun 2020, 6:50 PM
Munir Ahmed Yakin
8 Respostas
+ 2
Munir Ahmed Yakin It makes not go to the next stroke. Example: print("A") print("B) Result: A B print("A", end="") print("B", end="") Result: AB
24th Jun 2020, 7:15 PM
Валерий Карклин
Валерий Карклин - avatar
+ 1
Unfortunately i can't explain it, but what is the idea of making for loop with one repeat? Where you got this code?
24th Jun 2020, 7:04 PM
Валерий Карклин
Валерий Карклин - avatar
0
In one of the challenge in sololearn python 😔
24th Jun 2020, 7:06 PM
Munir Ahmed Yakin
0
Why you are answering not completely? Drop the link to the challenge. Maybe it helps.
24th Jun 2020, 7:07 PM
Валерий Карклин
Валерий Карклин - avatar
0
My mistake with the loop for arguments 😢
24th Jun 2020, 7:10 PM
Валерий Карклин
Валерий Карклин - avatar
0
~ swim ~ What does ,end ='' does in print?
24th Jun 2020, 7:13 PM
Munir Ahmed Yakin