Book Image

Iterators in Functional Programming with Python [Video]

By : Sebastiaan Mathôt
Book Image

Iterators in Functional Programming with Python [Video]

By: Sebastiaan Mathôt

Overview of this book

<p><span id="description" class="sugar_field">Functional programming is a style of programming that is characterized by short functions and little reliance on variables. You will learn what functional programming is, and how you can apply functional programming in Python.</span></p> <p><span id="description" class="sugar_field">In this volume, you will learn everything there is to know about iterators in Python and how crucial they are in functional programming, where they are used, among other things, to implement repetitive logic and coroutines. You will learn about all standard iterators and iterator functions that Python offers. You will also learn to implement your own iterators. Functional programming makes heavy use of iterators, and we will learn how you can use them in functional programming through an interactive calculator application. All videos in the course contains simple, hands-on examples to give you a firm grasp on the subject.</span></p> <p><span id="description" class="sugar_field">At the end of this course, you apply the techniques that you’ve learned in this course in the real world with a final example (an interactive calculator application) but this time based on a sensible mix of programming techniques, including (but not limited to) functional programming.</span></p> <h2><span class="sugar_field">Style and Approach</span></h2> <p><span class="sugar_field"><span id="trade_selling_points_c" class="sugar_field">This is a hands-on course where each video starts with a useful introduction, followed by short, practical examples; some topics contain more elaborate examples to demonstrate how all the concepts learned so far can be applied in a realistic project.</span></span></p>
Table of Contents (5 chapters)
Chapter 3
List and Dict Comprehensions, and Generator Expressions
Content Locked
Section 1
List Comprehensions
In this video, we first consider the difference between statements and expression. We then look at the list comprehension, which is an expressive alternative to the ‘for’ statement. - How statements and expressions differ - Introduce the list comprehension - How to use list expressions in real Python code