📌  相关文章
📜  如何在 python 中使用多个分隔符拆分字符串 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:07.870000             🧑  作者: Mango

代码示例4
#Do a str.replace('? ', ', ') and then a str.split(', ')
#Example:
a = "Hello, what is your name? I'm Bob."
a.replace('? ', ', ')
print(a)
#"Hello, what is your name, I'm Bob."
a.split(", ")
print(a)
#["Hello", "what is your name", "I'm Bob."]