python if substring in string delete substring code example
Example: remove substring python
>>> papa = 'papa is a good man'
>>> papa.replace('papa', '')
' is a good man'
>>> papa = 'papa is a good man'
>>> papa.replace('papa', '')
' is a good man'