I want to judge if all words in a string are proper English words. I am using a function to check it:
is_word_english(word: str)
Returns a boolean value
The function can only process a word so I use split()
to take out spaces between words.
Here is an example:
a = ('Apple Banana')
b = a.split()
b
['Apple', 'Banana']
b[1]
'Banana'
is_word_english(b[1])
False
is_word_english('banana')
True