input: Write a python function that swaps the first and last elements of a given list.
  assert swap_elements([1,2,3]) == [3,2,1]
  assert swap_elements([1,2,3,4,4]) == [4,2,3,4,1]
  assert swap_elements([4,5,6]) == [6,5,4]
output: def swap_elements(lst):
      if len(lst) > 1:
          lst[0], lst[-1] = lst[-1], lst[0]
      return lst