To run the current line of the program and go to the next line type s

Each time you press s (which is short for "step"), you see the next line number and its code. In this example, you also see the result of the print statement on the first line.

This function creates a list.

> /Users/stef/<module>() -> def makelist():

Tip If you type s again at this point, the program jumps to line 8:

That's because the first time Python sees a function definition, it reads (defines) the whole function. This process is considered a single step.

Was this article helpful?

0 0

Post a comment