Write a nested loop program to get the following output:
Traversing through list using nested loop
Outer Loop 10
Inner Loop A
Inner Loop B
Inner Loop C
Outer Loop 20
Inner Loop A
Inner Loop B
Inner Loop C
Outer Loop 30
Inner Loop A
Inner Loop B
Inner Loop C
for i in [10, 20, 30]:
print(f'Outer Loop {i}')
for j in 'ABC':
print(f'Inner Loop {j}')
Comments
Leave a comment