Answers for "how split white spaces python"

0

how to strip white space of text in python?

sentence = ' hello  apple'
" ".join(sentence.split())
>>> 'hello apple'
Posted by: Guest on March-26-2021
0

how to preserve white space when joining an array python

>>> re.split(r'(s+)', your_arr_name)
['BBP1', '   ', '0.000000', '  ', '-0.150000', '    ', '2.033000', '  ', '0.00', ' ', '-0.150', '   ', '1.77']
Posted by: Guest on October-10-2020

Code answers related to "how split white spaces python"

Python Answers by Framework

Browse Popular Code Answers by Language