Answers for "remove value from string in 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
2

remove substring from string python

s = "Earthworms and Python are disgusting!"
s.replace('and Python ', '')
print(s)
#Run the code
result = "Earthworms are disgusting!"
Posted by: Guest on July-31-2021

Code answers related to "remove value from string in python"

Python Answers by Framework

Browse Popular Code Answers by Language