Learn practical skills, build real-world projects, and advance your career

For loop

fru = ["apple", "panana", "orange"]
for item in fru:
    print(item)
apple panana orange

Range(start, stop, step)

rows, cols = range(0, 4, 1), range(0, 4, 1)

for row in rows: 
    for col in cols:
        print(row, col)
        
0 0 0 1 0 2 0 3 1 0 1 1 1 2 1 3 2 0 2 1 2 2 2 3 3 0 3 1 3 2 3 3
for number in range(0, -10, -1):
    print(number, end = " ")
0 -1 -2 -3 -4 -5 -6 -7 -8 -9