# convert a string to words
import re
s = ('Python is an interpreted, object-oriented, high-level programming language with dynamic semantics.')
pattern = '[a-zA-Z-]+'
words= re.findall(pattern, s)
print(words)
['Python',
'is',
'an',
'interpreted',
'object-oriented',
'high-level',
'programming',
'language',
'with',
'dynamic',
'semantics']