What is |,<< ,sep and end | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
22nd Jul 2018, 10:52 PM
Daniel
Daniel - avatar
2 ответов
+ 3
| is a bitwise OR << is a left bitshift >> is a right bitshift sep is the separator to be used by the print function. It's not output in the example due to there only being 1 string passed into the function. try print(l, l, sep='/') to see the difference. end is the character(s) to be used/appended at/to the end of the print functions output. The default is a newline character '\n'. try adding another print statement to the example and you'll see it is printed immediately at the end of the previous print statements output instead of on a newline.
22nd Jul 2018, 11:20 PM
ChaoticDawg
ChaoticDawg - avatar
+ 2
Thank you very much 👍
22nd Jul 2018, 11:54 PM
Daniel
Daniel - avatar