1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| s_list=split(remove_punctuation(lower(s)))
(function) def split(s: Any) -> Any Return a list of words contained in s, which are sequences of characters separated by whitespace (spaces, tabs, etc.).
>>> split("It's a lovely day, don't you think?") ["It's", 'a', 'lovely', 'day,', "don't", 'you', 'think?']
(function) def remove_punctuation(s: Any) -> Any Return a string with the same contents as s, but with punctuation removed.
>>> remove_punctuation("It's a lovely day, don't you think?") 'Its a lovely day dont you think' >>> remove_punctuation("Its a lovely day dont you think") 'Its a lovely day dont you think'
|