Implementation of various sorting algorithms in Python