On the readability of Python comprehensions

Python comprehensions are often described as “more readable” when they are introduced to learners. Learners are commonly baffled by this. I was, and I’ve seen others push back at this description as well. Consider two trivial code examples. First without a comprehension: numbers = [1, 2, 3, 4, 5, 6] even_numbers = [] for number … Continue reading On the readability of Python comprehensions