Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Treehouse

Functional Python Course (How To)

via Treehouse

Overview

Functional programming is a great addition to any programmer's toolset. FP allows you to quickly filter lists, modify values, find answers, and other repetitious tasks with less code than other approaches.

What you'll learn

  • Sorting lists by arbitrary attributes
  • Filter, map, and reduce
  • Lambdas

Syllabus

Functional Rules

A lot of the power of functional programming comes from following some simple rules and best practices. Let's go over those so we can know what to do and what to avoid.

Chevron 7 steps
  • What is Functional Programming?

    1:57

  • Core Concepts

    2:35

  • Review: Core Concepts

    5 questions

  • Things Not To Do

    7:31

  • Review: Bad Practices

    5 questions

  • What We're Going to Work With

    5:34

  • First-Class Functions

    1 objective

Functional Workhorses

Now that we know the rules of functional programming, let's meet the tools we'll use the most. We'll also see how each of these utilities helps us stick to the rules of functional programming better.

Chevron 12 steps
  • Sorting

    8:08

  • Sorting

    2 objectives

  • attrgetter

    1 objective

  • Map

    6:35

  • Map

    2 objectives

  • Map Comprehension

    2 objectives

  • Filter

    5:09

  • Filter

    2 objectives

  • Filter comprehension

    1 objective

  • Chaining Functions

    6:49

  • Map and Filter

    3 objectives

  • Map and Filter Comprehension

    1 objective

The Lambda Lambada

Functional programming is home to a couple of odd but very useful utilities that you should know about. You might not use these items every day, but when you need them, you'll be very happy to have them.

Chevron 11 steps
  • Reduce

    9:30

  • Reduce

    4 objectives

  • Recursion

    1 objective

  • Lambda

    4:37

  • Lambda

    1 objective

  • Lambda 2

    1 objective

  • Partials

    4:53

  • Partial

    4 objectives

  • Currying

    5:19

  • Let's Wrap Up

    0:28

  • Review: Functional Python

    8 questions

Reviews

Start your review of Functional Python Course (How To)

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.