+ 1

How do you write a code that outputs.. "my friend:\nathan"... As its written without skipping to a new line using print function

Print problem in python

27th Sep 2019, 5:35 AM
Leiyagu John
Leiyagu John - avatar
2 Answers
+ 2
print(r"my friend\nis...")
27th Sep 2019, 5:50 AM
Théophile
Théophile - avatar
+ 3
print("my friend:\\nathan")
27th Sep 2019, 5:54 AM
Anton Böhler
Anton Böhler - avatar