1def sort(array=[12,4,5,6,7,3,1,15]):
2 less = []
3 equal = []
4 greater = []
5
6 if len(array) > 1:
7 pivot = array[0]
8 for x in array:
9 if x < pivot:
10 less.append(x)
11 if x == pivot:
12 equal.append(x)
13 if x > pivot:
14 greater.append(x)
15 sort(less)
16 sort(pivot)
17 sort(greater)