Home › coding › python › py functional

Py Functional — Free Python Tutorial

Learn Py Functional in Python with a free, beginner-friendly tutorial, examples and practice for Indian students on Syllab.in.

✓ 100% Free ✓ No Login Needed ✓ NCERT / CBSE Aligned ✓ Download as PDF

TL;DR: Learn Py Functional in Python with a free, beginner-friendly tutorial, examples and practice for Indian students on Syllab.in.

Written & reviewed by the Syllab.in Academic Team (CBSE/NCERT subject experts) · Updated Jul 14, 2026

🤖 Stuck on any question? Ask Syllab's free AI Tutor for a step-by-step explanation — instant, unlimited, no login.

Py Functional in Python

Python supports functional programming through map(), filter(), reduce(), and zip(). These eliminate explicit for loops for common transformation and aggregation patterns.

map(fn, iterable) transforms every element. filter(fn, iterable) keeps elements where fn returns True. Both return lazy iterators.

functools.reduce(fn, iterable) accumulates: applies fn to first two elements, then to the result and next element, and so on. zip() pairs elements from multiple iterables together.

Py Functional — Syntax

import functools
squares = list(map(lambda x: x**2, [1,2,3,4]))      # [1,4,9,16]
evens   = list(filter(lambda x: x%2==0, range(10))) # [0,2,4,6,8]
total   = functools.reduce(lambda a,b: a+b, [1..10]) # 55
pairs   = list(zip([1,2,3], ['a','b','c']))           # [(1,'a'),...]

Learn Py Functional step by step with Syllab's free interactive Python tutorial — runnable code examples, practice exercises and instant AI feedback, all free with no signup. Explore the full Python course →

Explore:

  • Syllabus
  • Practice
  • Mock Tests
  • NCERT Solutions
  • Coding
  • GK Quiz
  • Career Predictor
  • AI Tutor
  • Live Quiz
  • Doubt Solver
  • Microlearning
  • Free Alternatives
  • Kids Zone
  • Study Room
  • Calculators
  • Worksheets

Syllab.in — Free learning for Indian students, Class 1–12