Answers for "remove everything after substring python"

21

remove substring python

>>> papa = 'papa is a good man'
>>> papa.replace('papa', '')
' is a good man'
Posted by: Guest on August-28-2020
0

python remove everything after character

sep = '...'
stripped = text.split(sep, 1)[0]
Posted by: Guest on April-06-2021

Code answers related to "remove everything after substring python"

Python Answers by Framework

Browse Popular Code Answers by Language