+ 2

what is >>a<<(this one) for a in range(5,7)

I know for loops but what is that a in the beginning? sometimes it is a*2 for a in range (5,7) can you explain the beginning of for ?

25th Jun 2016, 2:04 PM
Oyuncu Doruk
Oyuncu Doruk - avatar
1 Answer
+ 2
a is the variable in the statements in the loop. It will represent the value which is collected from the range (this time 5 for the first loop and 6 for the second loop).
25th Jun 2016, 2:16 PM
Jurgen Mueller
Jurgen Mueller - avatar