Nested loops in Python are easy ➿

8 Views
Published
#Python #course #tutorial

# nested loop = A loop within another loop (outer, inner)
# outer loop:
# inner loop:

rows = int(input("Enter the # of rows: "))
columns = int(input("Enter the # of columns: "))
symbol = input("Enter a symbol to use: ")

for x in range(rows):
for y in range(columns):
print(symbol, end="")
print()
Category
Bro Code
Tags
python tutorial for beginners, python course, python tutorial
Be the first to comment