+ 1
In this question ptint is out of the for loop so, how can print a output! Please answer?
3 Answers
+ 1
For loop is just a block of code that performs operations based on your requirements. Once that is done, the control will come out of the loop and execute the rest of the code.
+ 1
range(initial, end, step)
k = k+"0"
k = "0"+" 2"
k = "02" + "4"
and so on
when for loop is over,
k = "02468" because 10 is end point and out of range.
then you just print out k variables value
0
It is difficult to understand?