String to words
Converts a given string into a list of words.
- Use
re.findall()with the suppliedpatternto find all matching substrings. - Omit the second argument to use the default regexp, which matches alphanumeric and hyphens.
Converts a given string into a list of words.
re.findall() with the supplied pattern to find all matching substrings.