input: def fibonacci_sequence(n: int) -> List[int]:
      """
      Generate the Fibonacci sequence as a list of integers up to the nth element.
      
      >>> fibonacci_sequence(5)
      [0, 1, 1, 2, 3]
      >>> fibonacci_sequence(10)
      [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
      """
output:     if n <= 0:
          return []
      elif n == 1:
          return [0]
      elif n == 2:
          return [0, 1]
      
      fib_seq = [0, 1]
      for i in range(2, n):
          fib_seq.append(fib_seq[-1] + fib_seq[-2])
      
      return fib_seq