LernerPython

Intro Python: Functions

Learn how to write functions — and how those functions work behind the scenes.

What you should know

Course Content

Course length

4 hours

Number of lessons

46

Training materials

9 PDFs + Jupyter notebooks

Coding exercises

11

LEARN MORE

If you’re programming in Python, then you’re probably writing functions. The good news is that this is fairly straightforward; it’s not unusual to start writing functions in the first day of a Python course. But Python functions are also powerful and flexible, and that’s where things can get complex. 

Underneath the basic syntax are a variety of capabilities that are easy to use, if you know where to look and how to think. This course is all about understanding Python functions, how they work under the hood, and how you can take advantage of this knowledge in your own programs. 

Among other things we discuss in this course are:

  • Functions as nouns, not just verbs
  • treating functions as objects
  • How arguments are mapped to parameters 
  • Working with Python’s local, global, and builtin variable scopes
  • Writing functions that take optional arguments
  • Dispatch tables, and how they can make your life easier 

This course is based on the material that I teach on a regular basis at Fortune 500 companies around the world. It’s meant for someone who already has a good sense of Python’s fundamental data types and syntax, and who wants to write functions that are more complex than “Hello, world” and which can take advantage of Python’s many sophisticated features.

The course includes a wide variety of exercises, based on questions I’ve given to my corporate-training clients over the years. As you solve these problems, you’ll gain insights into how to write more efficient, readable, and idiomatic functions in Python.

  • How to write Python functions
  • How arguments are mapped to parameters​
  • The seven different types of Python parameters
  • Dispatch tables, and how they can make your life easier
  • Working with Python’s local, global, and builtin variable scopes
  • Writing functions that take optional arguments
  • Passing functions as arguments to other functions

All courses at LernerPython are taught by Reuven Lerner.