QuickSort algorithm implemented in Python