What is: end = "" in Python? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

What is: end = "" in Python?

16th May 2019, 7:51 AM
Mimi
Mimi - avatar
2 ответов
+ 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