()
Module : str
Remplace toutes les occurrences d'une sous-chaîne par une autre.
📝 Syntaxe
str.replace(old, new, count=-1)💡 Exemples
'hello world'.replace('world', 'Python')→ 'hello Python'
'a a a'.replace('a', 'b', 2)→ 'b b a'
Module : str
Remplace toutes les occurrences d'une sous-chaîne par une autre.
str.replace(old, new, count=-1)'hello world'.replace('world', 'Python')→ 'hello Python'
'a a a'.replace('a', 'b', 2)→ 'b b a'
