def qsort2(lst): if len(lst) == 0: return [] else: x = lst[0] return (qsort2([i for i in lst[1:] if i<x]) + [x] + qsort2([i for i in lst[1:] if i>=x]) I know this will probably sound odd, but for me, the first time I saw the list comprehension expression of quicksort was the first time it was immediately apparent to me how quicksort worked. Skip