complete implementing selection sort in python