def hide(iterable):
for v in iterable:
yield v
def group_func(iterable,p):
result = []
for i in iterable:
result.append(i)
if p(i):
yield result
result = []
yield result
print([v for v in group_func('combustibles', lambda x : x in 'aeiou')])
print([v for v in group_func(hide('combustibles'), lambda x : x in 'aeiou')])
你想这样分词吗?在
相关问题 更多 >
编程相关推荐