📜  python 在字符后剪切字符串 - Python 代码示例

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

代码示例1
a_string = "ab-cd"
split_string = a_string.split("-", 1)
substring = split_string[0]
print(substring)