Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

strip first occurence of substring python

>>>mystring = "Description: Mary had a little lamb Description: "
>>>print mystring.replace("Description: ","",1)

"Mary had a little lamb Description: "
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #strip #occurence #substring #python
ADD COMMENT
Topic
Name
8+5 =