Answers for "remove extra whitespace from string python tail python"

4

remove all whitespace from string python

import re
s = 'n t this is a string   with a lot of whitespacet'
s = re.sub('s+', '', s)
Posted by: Guest on August-03-2020
2

remove extra spaces and empty lines from string python

"n".join([s for s in code.split("n") if s])
Posted by: Guest on March-13-2021

Code answers related to "remove extra whitespace from string python tail python"

Python Answers by Framework

Browse Popular Code Answers by Language