ifnotpredicate(x):yieldxbreakforxiniterable:yieldx itertools.groupby(iterable[,key]) 创建一个从迭代器中返回连续键和组的迭代器