python replace 5cn with something else

Solutions on MaxInterview for python replace 5cn with something else by the best coders in the world

showing results for - "python replace 5cn with something else"
Oskar
08 Jan 2017
1#Just print the text and copy from console
2print(f"A \n B \n C")
3#output:
4# A
5# B
6# C
Giulio
21 Jun 2019
1>>> import re
2>>> re.sub('\r?\n', ' $ ', 'a\r\nb\r\nc')
3'a $ b $ c'
4>>> re.sub('\r?\n', ' $ ', 'a\nb\nc')
5'a $ b $ c'
6