Right triangle pattern program using the number in python

Right triangle pattern program using the number in python. Python programming language number pattern program. This is a simple series of pattern program written in Python. To understand the principle of python programming, print the number pattern in the language.

lines = 5
for num in range(lines):
for i in range(num):
print(num, end=" ") 
print(" ")

 

Output:

1
2 2
3 3 3
4 4 4 4
5 5 5 5 5