摘要: ###第一种方法 使用 str.rstrip() 方法从字符串中删除最后一个逗号,例如 new_str = my_str.rstrip(';')。 str.rstrip() 方法将返回删除尾随逗号的字符串副本 str = '颜色:高帮下单备注;尺寸:42;' new_str = str.rstrip 阅读全文
posted @ 2023-03-29 10:29 莫贞俊晗 阅读(125) 评论(0) 推荐(0) 编辑