s = 'ab12abc34ba'
print(s.replace('ab', ''))
text='ramkumar'
text=text.replace("mku","") #'' is empty
print(text)
ans:
ramar
"Str*ing With Chars I! don't want".replace('!','').replace('*','')
varible.replace(letter, "") # blank quotes.
# e.g.
s = "Hello World"
print(s.replace('e', ""))
# Hllo World
# great for data cleansing
# Python program to remove single occurrences of a character from a string
text= 'ItsMyCoode'
print(text.replace('o','',1))
s = "Fuuad"
res = s.replace('u','',1)
print(res)
re.sub(r'([^)]*)', '', filename)
Food = ["Apple", "lemon", "Mango"]
Food.append("Cake")
Food.remove("lemon")
for x in Food:
print(x)
str1 = "abcdefghij"
list1 = list(str1)
print(list1)
shop = ["Python", "js" , "c#"]
shop.remove("js")
for x in shop:
print(x)