The input is a string and the output is a list, each cell contains the corresponding word.
Word is defined to be a sequence of letters and/or numbers.
For example, Ilove is a word, 45tgfd is a word, 54fss. isn't a word because it has ..
Let us assume that commas come only after a word.
For example - 'Donald John Trump, born June 14, 1946, is the 45th'
should become
['Donald', 'John', 'Trump', 'born', 'June', '14', '1946', 'is', 'the', '45th']
Tried doing it with
[x.rstrip(',') for x in line.split() if x.rstrip(',').isalpha() or x.rstrip(',').isdigit()]
when line is the original string, however it became messy and wrong - couldn't detect '45th' because of isdigit and isalpha.
any idea?