DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python replace only first instance
text.replace("text", "new", count) # count is the number of instances you want to replace
PREVIOUS
NEXT
Tagged:
#python
#replace
#instance
ADD COMMENT
Topic
COMMENT
Name
9+4 =
Submit