input: Write a function to identify and correct potential errors in a given Python function that modifies a list while iterating over it. The original function should be analyzed, and the corrected function should avoid modifying the list during iteration by making a copy of the list before iteration.
  assert expand_list([1, 2, 3]) == [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]
  assert expand_list([4, 5]) == [4, 5, 4, 5, 4, 5, 4, 5]
  assert expand_list([]) == []
  assert expand_list([6]) == [6, 6]
output: def expand_list(lst):
      lst_copy = lst[:]
      for item in lst_copy:
          lst.append(item)
      return lst