Answers for "how to replace \n with period using python"

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 "how to replace \n with period using python"

Python Answers by Framework

Browse Popular Code Answers by Language