equal
deleted
inserted
replaced
668 squares.append(i * i) |
668 squares.append(i * i) |
669 # list comprehension |
669 # list comprehension |
670 squares = [i*i for i in range(1, 100) |
670 squares = [i*i for i in range(1, 100) |
671 if i % 10 in [1, 2, 5, 7]] |
671 if i % 10 in [1, 2, 5, 7]] |
672 \end{verbatim} |
672 \end{verbatim} |
|
673 \newpage |
|
674 \section{Further Reference:} |
|
675 \begin{itemize} |
|
676 \item Most referred and trusted material for learning \emph{Python} language is available at docs.python.org/tutorial/ |
|
677 \item ``may be one of the thinnest programming language books on my shelf, but it's also one of the best.'' -- \emph{Slashdot, AccordianGuy, September 8, 2004}- available at diveintopython.org/ |
|
678 \item How to Think Like a Computer Scientist: Learning with Python available at http://www.openbookproject.net/thinkcs/python/english/ \\ |
|
679 ``The concepts covered here apply to all programming languages and to problem solving in general.'' -- \emph{Guido van Rossum, creator of Python} |
|
680 \end{itemize} |
673 \end{document} |
681 \end{document} |