Help in Python3 | SoloLearn: Learn to code for FREE!

+2

Help in Python3

How do you add a blank line in Python3?

9/13/2019 8:11:32 PM

Kai McCormick

10 Answers

New Answer

+14

print("\n")

+5

+3

Put \n in the print statement Or add print() and continue your code Example 1. print("\nWhat you want to print") 2. print() print("What you want to print")

+1

You can use special character "\n" print("12\n3\n\n45") Output: 12 3 45

+1

add \n numbers = 1\n2\n3\n4 print(numbers) 1 2 3 4

0

Print()

0

[Not an answer] Hello Kuldeep Yadav , this is the answer section of a question, you can just post a question yourself! Go to discuss section and click that pen icon to write a question yourself mate 👍🏻

0

print("\n")

-1

Define a function in python3 Define a function in py3 def birth_year(): lst=[] lst2=[] lst3=[] for i in range(3): x=input("name : ") y=1399-int(input("birth year : ")) lst.append(x) lst2.append(y) z=int(lst2.index(min(lst2))) lst3.append(lst[z]) lst3.append(lst2[z]) Return(lst3) >>> birth_year() name : M birth year : 1345 name : A birth year : 1389 name : B birth year : 1377 ['M', 54, 'A', 10, 'B', 22] i want to be [A , 10 , B , 22 , M , 54] (ascending) what can i do?