Chapter 9. if Tests
This chapter presents the Python if
statement—the main statement used for selecting from
alternative actions based on test results. Because this is our first
exposure to compound statements—statements
which embed other statements—we will also explore the general
concepts behind the Python statement syntax model here. And because
the if statement introduces the notion of tests,
we'll also use this chapter to study the concepts of
truth tests and Boolean expressions in general.
|