Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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}
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #remove #string #string #python
ADD COMMENT
Topic
Name
1+8 =