How to use string.replace() in python 3.x - Stack Overflow
https://stackoverflow.com/questions/9452108/how-to-use-string-replace-in-python-3-x
WEBFeb 26, 2012 · originStr = "Hello world" # Use case 1: use builtin str's replace -> str.replace(strVariable, old, new[, count]) replacedStr1 = str.replace(originStr, "world", "Crifan Li") print("case 1: %s -> %s" % (originStr, replacedStr1)) # Use case 2: use str variable's replace -> strVariable.replace(old, new[, count]) replacedStr2 = …
DA: 33 PA: 74 MOZ Rank: 61