python 3.x上不推荐使用string.replace()
。做这件事的新方法是什么
与2.x中一样,使用str.replace()
例如:
>&燃气轮机>;'Hello world'.replace('world','Guido')
“你好,圭多”
共同学习, 共同进步, 祝各位早日成为代码大神
python 3.x上不推荐使用string.replace()
。做这件事的新方法是什么
与2.x中一样,使用str.replace()
例如:
>&燃气轮机>;'Hello world'.replace('world','Guido')
“你好,圭多”