摘要: string.count(str) 统计str在string中出现的次数 s = "一花一木一世界" print(s.count("一")) string.replace(old_str, new_str) 将string中的old_str 替换为 new_str s = "一花一木一世界" # 替 阅读全文
posted @ 2022-11-13 20:54 码上测 阅读(27) 评论(0) 推荐(0) 编辑