#h=height
h = int(input("Enter the height of triangle : "))
for I in range(1,h+1):
  for J in range (I):
    print("*",end=" ")
  print("\r")
     
           
Note: Need to be arranged in compiler after copied
   

 OutPut:

Enter the height of triangle : 5
*
* *
* * *
* * * *
* * * * *