Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 01ba799

Browse files
committed
A number of list examples used 66.6, but I doubt there's any box on which
repr(66.6) == "66.6", so doubt that the claimed output has ever been seen. Changed it to 66.25 everywhere, and manually verified that the new claimed output is correct.
1 parent 7d88a58 commit 01ba799

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

Doc/tut/tut.tex

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,24 +1749,24 @@ \section{More on Lists \label{moreLists}}
17491749
An example that uses most of the list methods:
17501750

17511751
\begin{verbatim}
1752-
>>> a = [66.6, 333, 333, 1, 1234.5]
1753-
>>> print a.count(333), a.count(66.6), a.count('x')
1752+
>>> a = [66.25, 333, 333, 1, 1234.5]
1753+
>>> print a.count(333), a.count(66.25), a.count('x')
17541754
2 1 0
17551755
>>> a.insert(2, -1)
17561756
>>> a.append(333)
17571757
>>> a
1758-
[66.6, 333, -1, 333, 1, 1234.5, 333]
1758+
[66.25, 333, -1, 333, 1, 1234.5, 333]
17591759
>>> a.index(333)
17601760
1
17611761
>>> a.remove(333)
17621762
>>> a
1763-
[66.6, -1, 333, 1, 1234.5, 333]
1763+
[66.25, -1, 333, 1, 1234.5, 333]
17641764
>>> a.reverse()
17651765
>>> a
1766-
[333, 1234.5, 1, 333, -1, 66.6]
1766+
[333, 1234.5, 1, 333, -1, 66.25]
17671767
>>> a.sort()
17681768
>>> a
1769-
[-1, 1, 66.6, 333, 333, 1234.5]
1769+
[-1, 1, 66.25, 333, 333, 1234.5]
17701770
\end{verbatim}
17711771

17721772

@@ -1958,13 +1958,13 @@ \section{The \keyword{del} statement \label{del}}
19581958
empty list to the slice). For example:
19591959

19601960
\begin{verbatim}
1961-
>>> a = [-1, 1, 66.6, 333, 333, 1234.5]
1961+
>>> a = [-1, 1, 66.25, 333, 333, 1234.5]
19621962
>>> del a[0]
19631963
>>> a
1964-
[1, 66.6, 333, 333, 1234.5]
1964+
[1, 66.25, 333, 333, 1234.5]
19651965
>>> del a[2:4]
19661966
>>> a
1967-
[1, 66.6, 1234.5]
1967+
[1, 66.25, 1234.5]
19681968
\end{verbatim}
19691969

19701970
\keyword{del} can also be used to delete entire variables:

0 commit comments

Comments
 (0)