input: Write a function that generates a list using a while loop in Python and appends the current number to the list. The function should take an integer input representing the upper limit for the loop and an increment step value. It should return the resulting list.
  assert generate_list(10, 1) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  assert generate_list(5, 2) == [0, 2, 4]
  assert generate_list(7, 3) == [0, 3, 6]
  assert generate_list(0, 1) == []
  assert generate_list(3, -1) == [0, 1, 2, 3]
output: def generate_list(upper_limit, step):
      result = []
      current = 0
      while current < upper_limit:
          result.append(current)
          current += step
      return result