Geek is very fond of patterns. Once, his teacher gave him a  pattern to solve. He gave Geek an integer n and asked him to build a pattern.
Help Geek to build a pattern.
 
Example 1:
Input: 5
Output:
1
2 2 
3 3 3 
4 4 4 4 
5 5 5 5 5
 
Your Task:
You don't need to input anything. Complete the function printTriangle() which takes  an integer n  as the input parameter and print the pattern.
Constraints:
	1<= N <= 20

Source: geeksforgeeks | Difficulty: EASY

Starter code: #User function Template for python3



class Solution:

    def printTriangle(self, N):

        # Code here

Solutions:
class Solution:

	def printTriangle(self, N):
		for i in range(1, N + 1):
			for j in range(1, i + 1):
				print(i, end=' ')
			print()


class Solution:

	def printTriangle(self, N):
		for i in range(1, N + 1):
			print(i * (str(i) + ' '))


class Solution:

	def printTriangle(self, N):
		i = 1
		c = ''
		while i <= N:
			print((str(i) + ' ') * i)
			i += 1


class Solution:

	def printTriangle(self, N):
		for x in range(1, N + 1):
			for y in range(1, x + 1):
				if x == y:
					print(x)
					break
				print(x, end=' ')


class Solution:

	def printTriangle(self, N):
		i = 1
		while i <= N:
			j = 1
			while j <= i:
				print(i, end=' ')
				j += 1
			print()
			i += 1


class Solution:

	def printTriangle(self, n):
		for i in range(1, n + 1):
			s = str(i) + ' '
			s = s * i
			print(s)


class Solution:

	def printTriangle(self, N):
		for roe in range(N):
			for col in range(roe + 1):
				print(roe + 1, end=' ')
			print()


class Solution:

	def printTriangle(self, N):
		k = 1
		for i in range(N):
			for j in range(0, i + 1):
				print(k, end=' ')
			k += 1
			print()
		return 0


class Solution:

	def printTriangle(self, N):
		for x in range(1, N + 1):
			for y in range(x):
				print(x, end=' ')
			print()
		return


class Solution:

	def printTriangle(self, N):
		arr = list(range(1, N + 1))
		for item in arr:
			print((str(item) + ' ') * item)