python remove everything after 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'