Language time

Report a typo

As you already understood, Python has many third-party libraries for a variety of purposes. For example, natural language processing plays quite an important role among them. NLTK is one of the main libraries for NLP purposes.

Check out the documentation of this library and its examples. Not everything may be clear to you now, but that's okay. From the options below, choose the line of code that will help you split the following sentence into words:

sentence = """We cannot solve our problems 
with the same thinking 
we used when we created them."""

The result after the operation should be the following:

['We', 'can', 'not', 'solve', 'our', 'problems', 'with', 'the', 'same', 'thinking', 'we', 'used', 'when', 'we', 'created', 'them', '.']
Select one option from the list
___

Create a free account to access the full topic