You need two loops – one nested within another. One to print the rows and another to print the numbers within the rows. The range of the first loop is pretty straight forward, but the range of the nested loop will depend on the parent loop.
For Python 3.x:
for i in range(1,11):
for j in range(1, i+1):
print(j, end="")
print()
3
solved How can i make repetitve loop in python? [closed]