---
title: "Comment by Amal Shaji on \"8 explained examples of list comprehension in Python\" | Hashnode"
description: "Super cool post. List comprehensions are very useful. I&#39;ve got some alternate solutions to make life harder. Simple Filtering Filtering and applying some op"
url: "https://hashnode.com/posts/8-explained-examples-of-list-comprehension-in-python/60754383308cd51e1478008c/comment/60755497308cd51e14780215"
---

[Discussion](https://hashnode.com/posts/8-explained-examples-of-list-comprehension-in-python/60754383308cd51e1478008c)

Comment [8 explained examples of list comprehension in Python](https://hashnode.com/posts/8-explained-examples-of-list-comprehension-in-python/60754383308cd51e1478008c)

[Amal Shaji](https://hashnode.com/@amal)

[Apr 13, 2021](https://hashnode.com/posts/8-explained-examples-of-list-comprehension-in-python/60754383308cd51e1478008c/comment/60755497308cd51e14780215)

Super cool post. List comprehensions are very useful. I've got some alternate solutions to make life harder.

### Simple Filtering

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1618301078690/UolWzvlfp.png)

### Filtering and applying some operation

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1618301186409/tW9cUh4T7.png)

### Combining all elements

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1618302012588/tjKJtPnrh.png)

### Common elements

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1618301583320/OUdurbb59.png)

### Using it with a function

Use `map(Callable, Iterable)`

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1618301811996/qFqGMP5Uk.png)

[GirlThatLovesToCode](https://hashnode.com/@GirlThatLovesToCode)

[Apr 15, 2021](https://hashnode.com/posts/8-explained-examples-of-list-comprehension-in-python/60754383308cd51e1478008c/comment/60755497308cd51e14780215#reply-6077ea86a3407a32d7042c47)

Thanks for making life harder :P

[Tosin Ayodele](https://hashnode.com/@devtosxn)

[Apr 16, 2021](https://hashnode.com/posts/8-explained-examples-of-list-comprehension-in-python/60754383308cd51e1478008c/comment/60755497308cd51e14780215#reply-6079d49d5af33606b2563d08)

Exactly my point when I went through the work [GirlThatLovesToCode](https://hashnode.com/@GirlThatLovesToCode)
