input: Write a function to generate a list using a while loop in Python that appends the current number to the list. The function should return the generated list.
  def generate_list():
      my_list = []
      num = 0
      while num < 10:
          my_list.append(num)
          num += 1
      return my_list
  
  assert generate_list() == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  assert generate_list() != []
  assert generate_list() != [1, 2, 3, 4, 5, 6, 7, 8, 9]
  assert generate_list() != [0, 1, 2, 3, 4, 5, 6, 7, 8]
output: def generate_list():
      my_list = []
      num = 0
      while num < 10:
          my_list.append(num)
          num += 1
      return my_list