How to add a new line in Python?

0 votes
How to specify a new line in python? Every time its coming in the same line. Can anyone help?
May 2, 2018 in Python by ana1504.k
• 7,870 points
72 views

1 answer to this question.

0 votes

You can use '\n' for a next line. Example:

print("Hello \nWorld")

Output - 

Hello
World
answered May 2, 2018 by aayushi
• 750 points

Related Questions In Python

0 votes
1 answer

How to add a new Python interpreter in PyCharm?

Refer to the below screenshots: Then set a ...READ MORE

answered May 30 in Python by Shabnam
• 920 points
283 views
0 votes
1 answer

How do you add a background thread to flask in Python?

The example below creates a background thread ...READ MORE

answered Nov 19, 2018 in Python by Nymeria
• 3,520 points
5,839 views
0 votes
0 answers
0 votes
1 answer

How can I write a program to add two numbers using functions in python?

def add(a,b):      return a + b #when i call ...READ MORE

answered May 20 in Python by Mohammad
• 3,060 points
45 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 173 views
+4 votes
6 answers
0 votes
2 answers

How to calculate square root of a number in python?

calculate square root in python >>> import math ...READ MORE

answered Apr 2 in Python by anonymous
164 views
+2 votes
11 answers