- 1
c = 0 for x in range(10): for y in range(5): c += 1 print(c)
Can anyone explain me it's output??
3 Answers
+ 4
For each iteration of outer loop inner loop runs full . so after every iteration of outer loop (1+1+1+1+1) = 5 is added to c .
And value of c is printed 10 times
5
5+5
10+5
15+5
.........
.........
50
+ 2
Thank you very much sir
0
Anyone???