Answers for "python re fin first occurance of substring and remove substring along with any trailing string"

1

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: "
Posted by: Guest on June-18-2020

Code answers related to "python re fin first occurance of substring and remove substring along with any trailing string"

Python Answers by Framework

Browse Popular Code Answers by Language