
def sort(arr):
    if len(arr)<=1:
        return arr
    base=arr[0]
    left=[i for i in arr[1:]if i<=base]
    right=[i for i in arr[1:] if i > base]
    return sort(left)+[base]+sort(right)
print(sort([23,4332,44,6,43,423,5,4,64,35,34,54,576,56,36,57,587,46,6,5,75,]))