3 ms·
> "You have to cast your data back to a list/tuple after using enumerate() and map()." I think he means you don't get a list/tuple back after applying enumerat
by sgdpk 7y ago
> "You have to cast your data back to a list/tuple after using enumerate() and map()."
I think he means you don't get a list/tuple back after applying enumerate and map. That's actually lazy evaluation and it's a plus. If you just want to iterate over the values, why create a list that you are going to throw away? Twice the effort for nothing.
I agree with you that this reads as someone expecting JS behavior in Python.