Code Safari

Chapter 144·Beginner

Functions in Python

01 / 06

The core idea

A function is reusable, named logic.

Bundle a block of code under a name, then run it whenever you like by calling that name. Write once, use everywhere — the heart of organised code.

Functions in Python | Code Safari