Mt. Everest is the highest peak in the world. It's height is 8848 m.
我怎么把它分成两句话?除了“Mt”之外,不在点上分开吗?规则是,只要Mt后面跟一个点,它就需要跳过它。在
像这样:
^{pr2}$
目前为止的代码
data = "Mt. Everest is the highest peak in the world. It's height is 8848 m."
sentences=data.split(".")
print (sentences)
Tags:
当点号在
Mt
之后时,请使用负查找以避免拆分。在代码:
^{pr2}$相关问题 更多 >
编程相关推荐