Print empty line?

后端 未结 7 874
青春惊慌失措
青春惊慌失措 2020-12-25 12:37

I am following a beginners tutorial on Python, there is a small exercise where I have to add an extra function call and print a line between verses, this works fine if I pri

7条回答
  •  情书的邮戳
    2020-12-25 12:59

    This is are other ways of printing empty lines in python

    # using \n after the string creates an empty line after this string is passed to the the terminal.
    print("We need to put about", average_passengers_per_car, "in each car. \n") 
    print("\n") #prints 2 empty lines 
    print() #prints 1 empty line 
    

提交回复
热议问题