input: Write a function to generate a list in Python using a while loop and append the current number to the list until a specified limit is reached. Accept the limit as an input parameter to the function. If the limit is not provided or is zero, return an empty list.
  assert generate_list(10) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  assert generate_list(0) == []
  assert generate_list() == []
output: def generate_list(limit=0):
      result = []
      i = 0
      while i < limit:
          result.append(i)
          i += 1
      return result