|
|
|
|
|
by bpicolo
3989 days ago
|
|
List comprehensions are more direct, support more than just a function call, and in py3 map returns an iterable instead of a list (granted, easily solvable by list(map()) but it's an extra concern) List comprehensions are the very recommended strategy for constructing python lists, not to mention they're simply a fantastic language feature. Very direct, readable, and hard to get wrong. Python loses out a lot on it's functional sorts of functions (filter, map) because you can't use method chaining on a list for them, imo |
|