Answers for "python string replace new line"

1

python replace newline

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

python replace n with actual new line

#Just print the text and copy from console
print(f"A n B n C")
#output:
# A
# B
# C
Posted by: Guest on March-05-2021

Code answers related to "python string replace new line"

Python Answers by Framework

Browse Popular Code Answers by Language