Книга: Practical Programming, Fourth Edition
Назад: Exercises
Дальше: Functions That Python Provides

Chapter 3
Designing and Using Functions

People often perform the same kinds of tasks repeatedly, like converting temperatures or formatting text. To avoid duplicating code, programmers use functions: named chunks of code that can be reused whenever needed. Functions also help break complex code into smaller, more understandable pieces. In this chapter, you’ll explore several built-in functions that come prepackaged with Python and learn how to define your own.

Назад: Exercises
Дальше: Functions That Python Provides