how to remove specific substring from string python code example
Example 1: remove substring python
>>> papa = 'papa is a good man'
>>> papa.replace('papa', '')
' is a good man'
Example 2: python remove specific character from string
s="Hello$ Python3$"s1=s.replace("$","",1)print (s1)#Output:Hello Python3$