Nested loops in Python are easy ➿

Опубликовано: 26 Октябрь 2022
на канале: Bro Code
303,465
6.9k

#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()