def quick_sort(A, start = None, end = None):
    """
    Sorts elements of a list in ascending order
    """
    start = 0 if start == None else start
    end = len(A) if end == None else end
    def partition(A, start, end):
        """
        Puts an element(last element) of a list in 
        place (its ordered) position
        """
        pivot = A[end - 1]
        pIndex = start
        for i in range(start, end):
            if A[i] <= pivot:
                temp = A[i]
                A[i] = A[pIndex]
                A[pIndex] = temp
                pIndex += 1
        return pIndex
    
    if (start >= end):
        return
    partitionIndex = partition(A, start, end)
    quick_sort(A, start, partitionIndex - 1)
    quick_sort(A, partitionIndex, end)
    return A