input: Write a function that generates a list using a while loop in Python and appends the current number to the list until a specified condition is met. The function should take a single parameter, which is the upper limit of the numbers to be appended to the list. If the upper limit is less than or equal to zero, the function should return an empty list. Additionally, the function should provide an optional parameter that specifies the increment value for the number.
  assert generate_list(10) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  assert generate_list(5, 2) == [0, 2, 4]
  assert generate_list(0) == []
  assert generate_list(-3) == []
  assert generate_list(7, 3) == [0, 3, 6]
output: def generate_list(upper_limit, increment=1):
      if upper_limit <= 0:
          return []
      result = []
      current = 0
      while current < upper_limit:
          result.append(current)
          current += increment
      return result