input: Write a function to generate a list using a while loop in Python and append the current number to the list. The function should increment the number until it reaches the specified limit. The function should accept one parameter, which is the limit number. The function should return the generated list.
  
  assert generate_list(10)==[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  assert generate_list(5)==[0, 1, 2, 3, 4]
  assert generate_list(0)==[]
  assert generate_list(3)==[0, 1, 2]
  assert generate_list(1)==[0]
output: def generate_list(limit):
      result = []
      i = 0
      while i < limit:
          result.append(i)
          i += 1
      return result