Quicksort LNJ

#!/usr/bin/env python2

def splitList(ls):
    n = len(ls)
    comp = ls[n / 2]
    l = 0
    r = n - 1
    while l < r:
        while ls[l] < comp:
            l += 1
        while ls[r] > comp:
            r -= 1
        if l < r:
            ls[r], ls[l] = ls[l], ls[r]
            l += 1
            r -= 1
        else:
            if l == r:
                l += 1
    return ls[:r], ls[l-1:]

def quickSort(ls):
    n = len(ls)
    if n > 2:
        left, right = splitList(ls)
        left = quickSort(left)
        right = quickSort(right)
        return left + right
    elif n == 2:
        if ls[0] > ls[1]:
            return [ls[1], ls[0]]
    return ls

moin = quickSort([16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])
print(moin)