cokofree...: > def s(c):return[]if c==[]else s([_ for _ in c[1:]if _<c[0]])+[c[0]]+s([_ for _ in c[1:]if _>=c[0]]) That QuickSort can be written as a lambda too: s=lambda l:[]if l==[]else s([x for x in l[1:]if x<l[0]])+[l[0]]+s([x for x in l[1:]if x>=l[0]]) Bye, bearophile