def quicksort(array, begin=0, end=None):
    if end is None:
        end = len(array) - 1

def _quicksort(array, begin, end):
    if begin >= end:
        return
pivot = partition(array, begin, end)
_quicksort(array, begin, pivot - 1)
_quicksort(array, pivot + 1, end)
return _quicksort(array, begin, end)
Быстрая сортировка с Python