Header Ads Widget

Responsive Advertisement

String

 



'''Write a Program to Strip & Remove a Text
at a same time'''
def strip_remove(string,word) :
    newStr = string.replace(word,"")
    m = newStr.replace("  "," ")
    return m.strip()
   
   

this = "   Subhamoy Panda is a bad good boy   "
a = strip_remove(this,"bad")
print (a)


Post a Comment

0 Comments