📜  python split string keep delimiter - Python 代码示例

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

代码示例1
line = ""
d = ">"
s =  [e+d for e in line.split(d) if e]
print(s)
#Output:
#["", ""]