def swap(lst, index1, index2):
  """This function will swap two items in a list and return the new list"""
  val1 = lst[index1]
  val2 = lst[index2]
  # swap index1 with index2
  lst[index1] = val2
  # swap index2 with index1
  lst[index2] = val1
  return lst