Implement selection sort in python