Home>Article>Backend Development> What does end="" mean in python?
Pass an empty string for end, so that the print function will not add a newline character to the end of the string, but add an empty string. In fact, this is also a grammatical requirement. Indicates that the statement is not finished.
Print defaults to printing one line with a newline at the end. end=' 'means no line break at the end, add a space. Interactive mode, the effect is as follows:
>>> print('a') a >>> print('a',end=' ') a >>> print('a',end='1234') a1234 >>>
Example:
For more Python related technical articles, please visit thePython Tutorialcolumn to learn !
The above is the detailed content of What does end="" mean in python?. For more information, please follow other related articles on the PHP Chinese website!