Python Indentation Example


For indentation, you have to create the same space (tabs) in the same block of code. In simple, It should be simple & consistent throughout the block.

Below is a good example using for under for loop

Program
for i in range(0,5): for j in range(0,i+1): print(" *",end="") print("\r")
Input
Output