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