4 ms·
I used to have an issue with readability of list comprehensions until I started using them on a regular basis. Now they actually make more sense to me and just
by jennasys 6y ago
I used to have an issue with readability of list comprehensions until I started using them on a regular basis. Now they actually make more sense to me and just feel more like Python than using map/filter. I think if you are used to using map, especially if you are coming from another language, it can take a bit of effort to retrain your brain. In general I don't think there is a significant performance advantage either way except for in very specific cases.