write a selection sort algorithm python