Answers for "remove everything that comes after a word python re"

10

remove word from string python

#You can remove a word from a string using str.replace ()
myString = 'papa is a good man'
newString = myString.replace('papa', '')
>>>' is a good man'
Posted by: Guest on March-14-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 that comes after a word python re"

Python Answers by Framework

Browse Popular Code Answers by Language