Some sorting algorithms in python