human
Splitting a string into words and punctuation
assistant
Here is some code to split a unicode string `text` into a list of words and punctuation characters with a regex

re.findall('\\w+|[^\\w\\s]', text, re.UNICODE)

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