By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,898 Members | 1,183 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,898 IT Pros & Developers. It's quick & easy.

In str.replace(old, new[, count],what is the use of count?,how to use count

P: n/a
In str.replace(old, new[, count],what is the use of count?,how to use count
Oct 21 '10 #1
Share this Question
Share on Google+
1 Reply


Atli
Expert 5K+
P: 5,058
As described in the Python documentation:
Return a copy of the string with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.
P.S.
Google is your friend!
Oct 21 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.