Chapter 7 · Lesson 7.1

for loop

Beginner 1 example 14 Nov 2026
English

for loop


नेपाली

लुप को लागी

Code examples

Example 1Example 1

Python example_1.py
for i in range(1,6):
    print(i)

Run executes the code in your own browser (the first run downloads Python, about 10 MB). Edit lets you change the code and try your own ideas. For programs with files, graphics (turtle, tkinter) or extra packages, copy the code and run it in VS Code.

Downloads

Your progress is saved in this browser.