0

How many times word "loop" will printed.. with explanation

https://code.sololearn.com/cG8p6Sj8VDBm/?ref=app

8th Jan 2019, 12:36 PM
rohan pawar
rohan pawar - avatar
5 Respostas
+ 3
https://goo.gl/X5y7tp Click on "visualize execution" and "forward >".
8th Jan 2019, 12:49 PM
Anna
Anna - avatar
0
arr = [0,1,2,3,4,5] n = 0 for _ in arr: del arr[n] n += 1 print("loop")
8th Jan 2019, 12:38 PM
rohan pawar
rohan pawar - avatar
0
Ok..but if we added 1 more element to the arr..ie. arr =[0,1,2,3,4,5,6] Then.. please explain this
8th Jan 2019, 12:47 PM
rohan pawar
rohan pawar - avatar
0
Rohan, what's happening has been explained. You need to do the rest of the thinking alone now (good practice).
8th Jan 2019, 1:29 PM
HonFu
HonFu - avatar
0
Ok
8th Jan 2019, 1:32 PM
rohan pawar
rohan pawar - avatar