Python 代码:将诗歌拆分为单独的句子
poem = '日照香炉生紫烟,遥看瀑布挂前川。飞流直下三千尺,疑是银河落九。'
lines = poem.split(',') # 以中文逗号为分隔符,拆分字符串
for line in lines: print(line) # 输出每一行
原文地址: https://www.cveoy.top/t/topic/mYUI 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
poem = '日照香炉生紫烟,遥看瀑布挂前川。飞流直下三千尺,疑是银河落九。'
lines = poem.split(',') # 以中文逗号为分隔符,拆分字符串
for line in lines: print(line) # 输出每一行
原文地址: https://www.cveoy.top/t/topic/mYUI 著作权归作者所有。请勿转载和采集!