Search code examples
pythonblank-line

Printing multiple blank lines in python


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


Solution

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

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