DATA = re.sub(',', '', 'DATA') DATA = re.sub('\'', '', 'DATA') DATA = re.sub('(', '', 'DATA') DATA = re.sub(')', '', 'DATA') -- http://mail.python.org/mailman/listinfo/python-list
I have some code that I want to simplify. I know that a for-loop would
work well, but can I make re.sub perform all of the below tasks at once,
or can I write this in a way that is more efficient than using a for-loop?
- Find and Replace Simplification Devyn Collier Johnson
- Re: Find and Replace Simplification Novocastrian_Nomad
- Re: Find and Replace Simplification John Gordon
- Re: Find and Replace Simplification Steven D'Aprano
- Re: Find and Replace Simplification Serhiy Storchaka
- Re: Find and Replace Simplification Skip Montanaro
- Re: Find and Replace Simplification Serhiy Storchaka
- Re: Find and Replace Simplific... Devyn Collier Johnson
- Re: Find and Replace Simplification Joshua Landau
- Re: Find and Replace Simplification Serhiy Storchaka
- Re: Find and Replace Simplific... Joshua Landau