Another way to map elements in Python is by using List Comprehension. List comprehension is an inline for loop, which can be used to quickly iterate over and process elements of a list.
We can also filter out elements using list comprehension.
The syntax for list comprehension is the following:
[(return value) for value in list if (condition)]