How do you write a code that outputs.. "my friend:\nathan"... As its written without skipping to a new line using print function | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 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 ответов
+ 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