← 返回列表

Python3 字符串String Replace 方法

Python3 字符串String Replace 方法 #!/usr/bin/python3 str = "this is string example....wow!!! this is really string" print (str.replace("is", "was")) print (str.replace("is", "was", 3))

Python3 字符串String Replace 方法

#!/usr/bin/python3

str = "this is string example....wow!!! this is really string"
print (str.replace("is", "was"))
print (str.replace("is", "was", 3))

打开资源 ↗

交流与评论