def isosceles_triangle(h): for i in range(1, h+1): spaces = h-i print(spaces*' ' + i*'* ')