Learn Functional Python Syntax in 10 Minutes [Tutorial]

Learn Functional Python Syntax in 10 Minutes [Tutorial]

In this article, you’ll learn what the functional paradigm is and how to use functional programming in Python. You’ll also learn about list comprehensions and other forms of comprehensions.

1 Like

@austin This story reminds me that you love Python.

as non-Python coder - it was easy to understand for me this basics

You need to implement 2 magic methods to make an object an iterable:

As far as I know, iterable objects just need to implement the iter magic method, as is described in the doc.

In Python, an iterator is an object which only has an __iter__ magic method. This means that we can access positions in the object, but cannot iterate through the object

Iterator has to implement the __next__ magic method too, see in the doc.