0% found this document useful (0 votes)
19 views

Python

This document demonstrates Python code examples using for loops to print values and strings multiple times, including basic for loops, nested loops, and loops with increment values other than 1.

Uploaded by

OLOLMAN 12
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Python

This document demonstrates Python code examples using for loops to print values and strings multiple times, including basic for loops, nested loops, and loops with increment values other than 1.

Uploaded by

OLOLMAN 12
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

# Online Python compiler (interpreter) to run Python online.

# Write Python 3 code in this online editor and run it.


print("Hello world")

for i in range(4):
print("B")

for i in range(5):
print(i)

for i in range(1, 4):


print(i)

for i in range(2, 5):


print(i)

for i in range(0, 10, 2):


print(i)

for i in range(6):
print(9 * "@")

print(1 * "@")
print(2 * "@")
print(3 * "@")
print(4 * "@")
print(5 * "@")

You might also like