func_code: def swap(a, i, j):
      tmp = a[i]
      a[i] = a[j]
      a[j] = tmp
  
  
  def selection_sort(a):
      for i in range(len(a)):
          smallest = i
          for j in range(i, len(a)):
              if a[j] < a[smallest]:
                  smallest = j
          swap(a, i, smallest)
      return a