Replace All Occurrences of a Substring in a String using Python July 1, 2021 Python 0 Comments 352 Views replace method text = 'abc def ghi abc' result = text.replace('abc', '123') print(result) # 123 def ghi 123
Leave a Comment
Cancel reply