Answers for "how to remove a string inside another string python"

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

Code answers related to "how to remove a string inside another string python"

Python Answers by Framework

Browse Popular Code Answers by Language