input: Write a function to generate a list containing numbers from 0 to n (inclusive) using a while loop in Python. The function should return the list.
  assert generate_list(10) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  assert generate_list(5) == [0, 1, 2, 3, 4, 5]
  assert generate_list(0) == [0]
  assert generate_list(-1) == []
  assert generate_list(3) == [0, 1, 2, 3]
output: def generate_list(n):
      result = []
      i = 0
      while i <= n:
          result.append(i)
          i += 1
      return result