web analytics

How to print blank lines in Python?

Some of the time you really want to print one clear or blank line in your Python program. Following is a guide to play out this assignment using Python print format.

Example:

Let us print 10 blank lines. You can type:

print (10 * "\n")

or:

print (“\n\n\n\n\n\n\n\n\n\n\n”)

Here is the code

print ("Welcome to Basicittopic")
print (10 * "\n")
print ("Welcome to Basicittopic")

Result

Welcome to Basicittopic









Welcome to Basicittopic

Related Posts

Leave a Reply

Your email address will not be published.