Answers for "python replace n with newline text"

1

python replace newline

without_line_breaks = a_string.replace("n", " ")
Posted by: Guest on November-11-2020
0

python replace n with something else

>>> import re
>>> re.sub('r?n', ' $ ', 'arnbrnc')
'a $ b $ c'
>>> re.sub('r?n', ' $ ', 'anbnc')
'a $ b $ c'
Posted by: Guest on March-30-2021

Code answers related to "python replace n with newline text"

Python Answers by Framework

Browse Popular Code Answers by Language