How does python replace string exactly works? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How does python replace string exactly works?

14th Jun 2017, 6:24 AM
R.PRAKASH
R.PRAKASH - avatar
2 Answers
+ 2
From the link posted by @Gideon: string.replace(s, old, new[, maxreplace]) > s: The string to search and replace from. > old: The old sub-string you wish to replace. > new: The new sub-string you wish to put in-place of the old one. > maxreplace: The maximum number of times you wish to replace the sub-string.
14th Jun 2017, 9:49 AM
visph
visph - avatar