List Comprehension in Python
Introduction to List Comprehension
Published in
4 min readMay 10, 2020
Python provides list comprehension constructs that make it easy to define lists, filter lists, create new lists based on existing lists and much more. Compared to traditional ‘for-loops’, list comprehension is a much more concise and readable alternative to creating lists in python. In this post, we will discuss how to use list comprehension to create lists…