Creating a pattern for words

Report a typo

There is a sentence and also a number in the input. You need to create a pattern that extracts only words from the sentence, that is, your resulting list should contain neither punctuation marks nor numbers. After that, use the index (the second line in the input) and print a token from the list of tokens.

Tip: Do not forget to import the module you need

Sample Input 1:

We were on the Queen Elizabeth, coming back from our first trip to Europe.
-1

Sample Output 1:

Europe
Write a program in Python 3





___

Create a free account to access the full topic