input: Write a python function to print a right-angled triangle pattern of stars.
  assert print_triangle(3) == "*\n**\n***\n"
  assert print_triangle(5) == "*\n**\n***\n****\n*****\n"
  assert print_triangle(1) == "*\n"
output: def print_triangle(n):
      return '\n'.join('*' * i for i in range(1, n + 1)) + '\n'