Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23c9ec8 commit 8c0a242Copy full SHA for 8c0a242
1 file changed
Doc/ref/ref6.tex
@@ -330,6 +330,18 @@ \section{The \keyword{print} statement \label{print}}
330
\withsubitem{(in module sys)}{\ttindex{stdout}}
331
\exindex{RuntimeError}
332
333
+\keyword{print} also has an extended form, defined as
334
+
335
+\begin{verbatim}
336
+print_stmt: '>>' expression [ (',' expression)+ [','] ] )
337
+\end{verbatim}
338
339
+In this form, the first expression after the \keyword{>>} must
340
+evaluate to a ``file-like'' object, specifically an object that has a
341
+\method{write()} method as described above. With the extended form,
342
+the subsequent expressions are printed to this file-like object
343
+instead of \code{sys.stdout}.
344
345
\section{The \keyword{return} statement \label{return}}
346
\stindex{return}
347
0 commit comments