How To Print A Blank Line Between Sets Of Print Statements? In Python

Here in this tutorial, we will discuss How To Have A Blank Line Between Sets Of Print Statements? In Python To print a blank line we need to use a special character in output to jump on the next line that is ‘/n’ and that needs to be in ‘ ‘ that is inside of the quotes.

How to Print The Output

Print bank line

To print the output n console in python we use a print method that helps users to print the output in a concatenation manner so it results in printing the simple output and getting the result to verify on the console.

But sometimes we need to switch the line and take the cursor to next  Only to make the output resentable and make some difference between what has been printed, As printing results continue on the console may lead to confusion in results.

So to overcome that they introduced a method to overcome it and get the result in a presentable manner.

Ways to Skip Line While Printing

There exists a way to overcome the confusion of mixing two different quantities or two different outputs using skipping a line between them. Although we can always provide a space between two answers or quantities.

Simple Giving Print() cammand

But skipping a line and keeping a line blank in between tho answers lead to an increase the readability. And we can do this simply by giving a simple command as print() (That is black command. For example.

print("My Name is Prakhar")
print("I am from Agra")
print()
print("Python is a very useful programing language ")
print("So lets Learn Python here")

Here I have given a blank print line just to print a blank line. so the output of the above program will be skipping a line in between the answers.

Using ‘/n’ In To Change The Line

Now we will discuss how we can perform it using ‘/n’ for changing the line. Let’s take an example

print("My Name is Prakhar")
 print("I am from Agra /n/n")
 print("Python is a very useful programing language ")
 print("So lets Learn Python here")

Here /n is provided to change the line to print the output here we can say I have used ‘/n twice which, means it will change the line twice. One where is was printing before or after that is will pass to the next line and just after skipping that line it will pass to the next line.

 

Learn More about Blank Line Between Sets Of Print Statements at: Printing a blank Line

And learn more about Printing output at printing output

 

Leave a Comment

%d bloggers like this: