Printing multiple blank lines in python

brisbass picture brisbass · Jan 24, 2015 · Viewed 28.7k times · Source

Is there a way that you can print more than one blank line in a programme, without having to type

print("\n")

load of times?

For example, I want to have a blank page (about 40 lines, I think) before my next line of text

Answer

Cory Kramer picture Cory Kramer · Jan 24, 2015

Just use multiplication, this will repeat your string however many times you'd like, in this case new lines

>>> print('\n' * 40)