input: Write a function to generate and print Pascal's triangle for a given number of rows. The function should return the number of rows printed if the input is valid, otherwise, it should return a message indicating the input is invalid.
  
  def print_pascal_triangle(n): 
      if n < 1: 
          return "Invalid input"
      trow = [1] 
      y = [0] 
      for x in range(n): 
          print(trow) 
          trow = [l + r for l, r in zip(trow + y, y + trow)] 
      return n
  
  assert print_pascal_triangle(5) == 5
  assert print_pascal_triangle(0) == "Invalid input"
  assert print_pascal_triangle(-1) == "Invalid input"
  assert print_pascal_triangle(3) == 3
output: def print_pascal_triangle(n): 
      if n < 1: 
          return "Invalid input"
      trow = [1] 
      y = [0] 
      for x in range(n): 
          print(trow) 
          trow = [l + r for l, r in zip(trow + y, y + trow)] 
      return n