selection sort version 2 in python