标签: python string
我需要格式化的字符串是
string = "How are you? abcdef"
我需要从字符串中删除“ abcdef”。
答案 0 :(得分:5)
string = string.split(' ')[0]