func_code: def swap(A, x, y):
      tmp = A[x]
      A[x] = A[y]
      A[y] = tmp
  
  
  def selectionsort(a):
      for i in range(len(a)):
          least = i
          for k in range(i + 1, len(a)):
              if a[k] < a[least]:
                  least = k
          swap(a, least, i)