def hello(a): if not a: yield None for i in a: yield i while True: print("true") for i in a: print("true after") yield i
``` python quickSort = lambda qs: qs if len(qs) <=1 else quickSort([l for l in qs[1:] if l < qs[0]]) + [qs[0]] + quickSort([l for l in qs[l:] if l >= qs[0]])
quicksort 轉載自: http://blog.sina.com.cn/s/blog_62508b050101femm.htmlhtml