0

What is: end = "" in Python?

16th May 2019, 7:51 AM
Mimi
Mimi - avatar
2 Answers
+ 5
In Python end is a keyword argument for print function. You can give end a value about what you would want to be printed last. end defines what would be printed in the end of print call. It is simple to use, but hard to explain, so I give an example: print("125 horses", end="and fish") output: 125 horsesand fish You might also be interested about keyword argument sep.
16th May 2019, 11:43 AM
Seb TheS
Seb TheS - avatar
0
Using \n will help you the end line and go to next line print ("Lorem ipsum dolor sit amet, consectetur adipiscing elit. \n Suspendisseeu varius lorem. Aenean hendrerit eu felis a vulputate. Ut quis.")
16th May 2019, 8:06 AM
Melih Melik Sonmez
Melih Melik Sonmez - avatar