Search results
Although users usually think of Python as a procedural and object-oriented language, it actually contains everything you need for a completely functional approach to programming. This article discusses general concepts of functional programming, and illustrates ways of implementing functional techniques in Python. View more content in this series
python grew out of a project to design a computer language which would be easy for beginners to learn, yet would be powerful enough for even advanced users. This heritage is reflected in python’s small, clean syntax and the thor-oughness of the implementation of ideas like object-oriented programming,
- 479KB
- 164
In this document, we’ll take a tour of Python’s features suitable for implementing programs in a functional style. After an introduction to the concepts of functional programming, we’ll look at language features such as iterators and
procedural way, using object-oriented programming or applying a functional approach. In this chapter, we explain the core concepts of functional programming in Python and how we develop our applications using this technique.
In this document, we’ll take a tour of Python’s features suitable for implementing programs in a functional style. After an introduction to the concepts of functional programming, we’ll look at language features such as iterators and generators and relevant library modules such as itertoolsand functools. 1Introduction
Functional programming decomposes a problem into a set of functions. Ideally, functions only take inputs and produce outputs, and don’t have any internal state that affects the output produced for a given input. Well-known functional languages include the ML family (Standard ML, OCaml, and other variants) and Haskell.
In this quiz, you'll test your understanding of functional programming in Python. You'll revisit concepts such as functions being first-class citizens in Python, the use of the lambda keyword, and the implementation of functional code using map (), filter (), and reduce ().
People also ask
What is functional programming in Python?
Is Python a functional language?
Why should you learn functional programming in Python?
Which Python features are suitable for implementing programs in a functional style?
What is a functional design in Python?
Which programming languages support functional programming?