human
Is there a generator version of `string.split()` in Python?
assistant
Here is some code to split string `string` on whitespaces using a generator

return (x.group(0) for x in re.finditer("[A-Za-z']+", string))

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.