height = 6 line_to_print = ' ' * height for i in range(0, height): line_to_print += '* ' # push a star on one end line_to_print = line_to_print[2:] # drop a space on the other print(line_to_print)