python split()

来源:互联网 发布:openssh windows 编辑:程序博客网 时间:2024/06/01 10:11
import rea='Beautiful, is; better*than\nugly'x= re.split(',|; |\*|\n',a)print(x)
['Beautiful', ' is', 'better', 'than', 'ugly']
'御景龙庭别墅'.strip('别墅')Out[28]: '御景龙庭'