Wednesday, November 12, 2014

How to print a blank line in python?

If you want the blank line to be printed...

....after your string just add "\n"at the end of it, like in this example:

print  "hello\n"

and  blank line will be printed after "hello".

.... before your string just add "\n" in the beggining of  it, like in this example:

print "\nhello"

.... in other cases, just write the word print, like in this example:

print 


No comments: