Part IV: Functions

In Part IV, we study the Python function a package of code that can be called repeatedly, with different inputs and outputs each time. We've already been calling functions earlier in the book: open, to make a file object, for instance. Here, the emphasis will be on coding user-defined functions, which compute values, perform part of a program's overall logic, or otherwise wrap code for easy reuse.



Learning Python
Learning Python: Powerful Object-Oriented Programming
ISBN: 0596158068
EAN: 2147483647
Year: 2003
Pages: 253
Authors: Mark Lutz

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net