Skip to Main Content
Programming in Python 3: A Complete Introduction to the Python Language, Second Edition
book

Programming in Python 3: A Complete Introduction to the Python Language, Second Edition

by Mark Summerfield
November 2009
Intermediate to advanced content levelIntermediate to advanced
648 pages
18h 41m
English
Addison-Wesley Professional
Content preview from Programming in Python 3: A Complete Introduction to the Python Language, Second Edition

4. Control Structures and Functions

This chapter’s first two sections cover Python’s control structures, with the first section dealing with branching and looping and the second section covering exception-handling. Most of the control structures and the basics of exception-handling were introduced in Chapter 1, but here we give more complete coverage, including additional control structure syntaxes, and how to raise exceptions and create custom exceptions.

The third and largest section is devoted to creating custom functions, with detailed coverage of Python’s extremely versatile argument handling. Custom functions allow us to package up and parameterize functionality—this reduces ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming in Python 3: A Complete Introduction to the Python Language

Programming in Python 3: A Complete Introduction to the Python Language

Mark Summerfield

Publisher Resources

ISBN: 9780321699909Purchase book