A word in a text is defined as the longest sequence of letters, where every character that is not a letter is considered a word boundary.

Assignment

Write a function word_split that takes the location of a text file (str). The function must return a list containing the sequence of words from the given text file.

Example

In the following interactive session we assume the text file data.en.txt1 to be located in the current directory.

>>> word_split('data.en.txt')
['Broadcast', 'by', 'the', 'BBC', 'between', 'and', 'Monty', 'Python', 's', 'Flying', 'Circus', 'was', 'conceived', 'written', 'and', 'performed', 'by', 'its', 'members', 'Graham', 'Chapman', 'John', 'Cleese', 'Terry', 'Gilliam', 'Eric', 'Idle', 'Terry', 'Jones', 'and', 'Michael', 'Palin']