摘要: 字符串处理 字符串截取 字符串[头下标:尾下标] str = "abcdefg" new_str = str[2:4] #new_str = "cde" 字符串替换 字符串.replace("被替换的内容","替换后的内容"[,次数]),替换次数可以为空,即表示替换所有 str = "a,b,c,d 阅读全文
posted @ 2021-12-06 22:22 D·Kingson.Mo 阅读(30) 评论(0) 推荐(0)