Post

@PythonPr The replace() method in Python returns a copy of the string where all occurrences of the substring are replaced with the new substring.
Answer: (b) chpcplate
Explanation:
The original string is s = 'chocolate'.
The code s.replace('o', 'p') replaces
English

@PythonPr I don't know which is why i follow you so now if you know please explain it to me
English

@PythonPr B est la bonne réponse. En python la méthode replace() remplace une occurrence donné par une autre
Français

@PythonPr B) chpcplate replace() doesn’t stop at the first match — it replaces all 'o' characters with 'p' in the string.
English

































