File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -718,6 +718,8 @@ \section*{Contributor List}
718718
719719\item William Murray corrected my definition of floor division.
720720
721+ \item Per Starb{\" a}ck brought me up to date on universal newlines in Python 3.
722+
721723% ENDCONTRIB
722724
723725In addition, people who spotted typos or made corrections include
@@ -6856,25 +6858,24 @@ \section{Reading word lists}
68566858
68576859\begin {verbatim }
68586860>>> fin.readline()
6859- 'aa\r\ n'
6861+ 'aa\n'
68606862\end {verbatim }
68616863%
68626864The first word in this particular list is `` aa'' , which is a kind of
6863- lava. The sequence \verb "\r\n " represents two whitespace characters,
6864- a carriage return and a newline, that separate this word from the
6865- next.
6865+ lava. The sequence \verb "\n " represents the newline character that
6866+ separates this word from the next.
68666867
68676868The file object keeps track of where it is in the file, so
68686869if you call {\tt readline} again, you get the next word:
68696870
68706871\begin {verbatim }
68716872>>> fin.readline()
6872- 'aah\r\ n'
6873+ 'aah\n'
68736874\end {verbatim }
68746875%
68756876The next word is `` aah'' , which is a perfectly legitimate
68766877word, so stop looking at me like that.
6877- Or, if it's the whitespace that's bothering you,
6878+ Or, if it's the newline character that's bothering you,
68786879we can get rid of it with the string method {\tt strip}:
68796880\index {strip method}
68806881\index {method!strip}
You can’t perform that action at this time.
0 commit comments