Python如何替换字符串中的某些字符?#Python2022-04-16 21:05分类:Python 0 条评论 请先 登录 后评论 默认排序 时间排序 1 个回答|266 次阅读 2022-04-16 21:10 Coco老师 - 官方公众号:青少儿编程学习网 擅长:编程教育 • 网站:https://kidscodes.cn/可以使用replace()方法进行替换。str1="Hello World"str2=str1.replace('llo','y')print(str2)输出:Hey World 请先 登录 后评论