-3
for i in range(1, 20):
    print(i)

I want to understand:

  • What (1, 20) means
  • How Python updates value of i
  • Why the loop prints the number one by one
3
  • See sopython.com/wiki/What_tutorial_should_I_read%3F, and please take the tour and read How to Ask. Commented Nov 14 at 16:28
  • 2
    I’m voting to close this question because the questioner just needs to turn to tutorials and not this site. Commented Nov 14 at 16:31
  • 1
    (1, 20) are the arguments to the range function. This is common syntax in most programming languages, you need to learn the basics before you can post reasonable questions here. Commented Nov 14 at 16:33

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.