[Solved] Indentation within a for loop


It is only run after the nested loop. Looking at the output from the post you referenced, the program starts with 1, prints one 1 without a newline, then exits the nested loop, then prints the newline. Then it enters the nested loop with 2, loops twice (prints a 2 without a newline, then prints a second two without a newline), then exits the loop and prints a newline.

solved Indentation within a for loop