for number in range(1,101): print number
Can someone please explain to me why the above code prints 1-100? I understand that the range functio
number is equivalent to i in your C loop, i.e., it is a variable that holds the value of each loop iteration.
number
i
A simple translation of your Python code to C would result in something along these lines:
for (int number = 1; number < 101; number++) { printf("%d\n", number); }