import re poetry = ('明月几时有?把酒问青天。', "我欲乘风归去,又恐琼楼玉宇。") for temp in poetry: for each in re.split(r'\s*[,。?]\s*',temp): print(each)