generator expressions
-
List, Dictionary, Set Comprehensions, and Difference between List Comprehensions and Generator expressionsDynamicPL/Python 2019. 10. 22. 16:56
1. Overview After reading this article you’ll learn: What are the list comprehensions in Python What are set comprehensions and dictionary comprehensions 2. Definition List comprehensions provide us with a simple way to create a list based on some iterable. During the creation, elements from the iterable can be conditionally included in the new list and transformed as needed. An iterable is some..
-
iterator, iterable, iteration, iterator protocol, generator functions, generator expressions, and lazy evaluationDynamicPL/Python 2019. 10. 22. 08:44
1. Overview In Python, iterable and iterator have specific meanings. How the iteration in Python works under the hood What are iterables and iterators and how to create them What is the iterator protocol What is a lazy evaluation What are the generator functions and generator expressions 2. Description 2.1 Loop 2.1.1 For Loop Python has something called for loop, but it works like a foreach loop..