I have a huge text file, each line has a tab-delimited string. I need to keep all tabs apart from those at the end of each line. I need to keep the carriage return. Any ideas?
I've tried everything on these answers:
- How to trim whitespace (including tabs)?
- Trimming a string in Python
- Strip spaces/tabs/newlines - python
as well as others I've now closed the tabs on.