input: Write a function to generate and print a Pascal triangle with a given number of rows. If the input number of rows is zero, the function should print nothing.
  def PascalTriangle(n):
      arr = [0 for i in range(n)]
      for line in range(0, n):
          for i in range (0, line + 1):
              if (i == 0 or i == line):
                  arr[i] = 1
              else:
                  arr[i] = arr[i] + arr[i - 1]
          for i in range (0, line + 1):
              print(arr[i], end =" ")
          print()
  
  assert PascalTriangle(0)==""
  assert PascalTriangle(1)=="1 "
  assert PascalTriangle(2)=="1 \n1 1 "
  assert PascalTriangle(3)=="1 \n1 1 \n1 2 1 "
  assert PascalTriangle(4)=="1 \n1 1 \n1 2 1 \n1 3 3 1 "
  assert PascalTriangle(5)=="1 \n1 1 \n1 2 1 \n1 3 3 1 \n1 4 6 4 1 "
output: def PascalTriangle(n):
      if n == 0:
          return ""
      result = ""
      arr = [0 for i in range(n)]
      for line in range(0, n):
          for i in range(0, line + 1):
              if i == 0 or i == line:
                  arr[i] = 1
              else:
                  arr[i] = arr[i] + arr[i - 1]
          for i in range(0, line + 1):
              result += str(arr[i]) + " "
          result += "\n"
      return result.strip()