Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
See Test Your Knowledge: Part II Exercises in Chapter 9 for the exercises.
The basics. Here are the sorts of
results you should get, along with a few comments about their
meaning. Again, note that ; is
used in a few of these to squeeze more than one statement onto a
single line (the ; is a
statement separator), and commas build up tuples displayed in
parentheses. Also keep in mind that the / division result near the top differs
in Python 2.6 and 3.0 (see Chapter 5 for
details), and the list wrapper
around dictionary method calls is needed to display results in
3.0, but not 2.6 (see Chapter 8):