Answers for "remove from one part to another in python string"

1

how to remove a string inside another string python

pythonCopylist_str = {'Abc.ex', 'Bcd.ex', 'cde.ex', 'def.jpg', 'efg.jpg'}
new_set = {x.replace('.ex', '').replace('.jpg', '') for x in list_str}
Posted by: Guest on September-13-2021
1

remove part of string python

txt = 'abbacabbd'
print(url.replace('bbd',''))

#output:
abbaca
Posted by: Guest on July-16-2020
2

remove a part of a string python

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

Code answers related to "remove from one part to another in python string"

Python Answers by Framework

Browse Popular Code Answers by Language