python 单词处理

给定一个由英文字符、数字、空格和英文标点符号组成的字符串,长度不超过2000,请将其切分为单词,要求去掉所有的非英文字母,每行输出一个单词。
例如有文本:Python was created in 1990 by Guido van Rossum at Stichting Mathematisch Centrum (CWI, see http://www.cwi.nl/) in the Netherlands.
处理完成之后得到以下单词:

Python
was
created
in
by
Guido
van
Rossum
at
Stichting
Mathematisch
Centrum
CWI
see
http
www
cwi
nl
in
the
Netherlands

import re

text = "Python was created in 1990 by Guido van Rossum at Stichting Mathematisch Centrum (CWI, see http://www.cwi.nl/) in the Netherlands."
# 使用正则表达式匹配所有的英文单词
words = re.findall(r'\b[A-Za-z]+\b', text)

# 输出所有的单词
for word in words:
    print(word)