Answers for "remove string from python"

0

how to remove a letter from a string python

varible.replace(letter, "") # blank quotes.
# e.g.
s = "Hello World"
print(s.replace('e', ""))
# Hllo World


# great for data cleansing
Posted by: Guest on March-20-2022
2

remove a part of a string python

url = 'abcdc.com'
print(url.replace('.com',''))
Posted by: Guest on July-20-2020
0

how to delete item in string python

newstr = oldstr.replace("M", "")
Posted by: Guest on December-10-2020

Python Answers by Framework

Browse Popular Code Answers by Language