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