n = 5 # size
for i in range(n):
    print(" "*(-1*i+n-1)+"*"*(2*i+1))

'''

Output:
    
    *
   ***
  *****
 *******
*********
 
'''

n = 5 # size
for i in range(n):
    print(" "*(-1*i+n-1)+"*"*(2*i+1))

'''

Output:
    
    *
   ***
  *****
 *******
*********
 
'''

# size Output:          *    ***   *****  ******* *********