How to print multiple lines of text in python

3 Answers

0 votes
print("Python\nPHP\nJava")

'''
run:

Python
PHP
Java

'''

 



answered Sep 28, 2017 by avibootz
0 votes
print("Python", "PHP", "Java", sep="\n")

'''
run:

Python
PHP
Java

'''

 



answered Sep 28, 2017 by avibootz
0 votes
s = """Python
PHP
Java
"""

print(s)

'''
run:

Python
PHP
Java

'''

 



answered Sep 28, 2017 by avibootz

Related questions

1 answer 154 views
1 answer 237 views
2 answers 257 views
1 answer 204 views
...