@author jackzhenguo @desc @date 2019/4/15
def bif_by(lst, f): return [ [x for x in lst if f(x)],[x for x in lst if not f(x)]]
测试举例:
records = [25,89,31,34] bif_by(records, lambda x: x<80) # [[25, 31, 34], [89]]