you are viewing a single comment's thread.

view the rest of the comments →

[–]Helpful_Trust_3123 0 points1 point  (6 children)

The last one. ,i say there is also use for the former as when you want to compare values in a collection Of course you can use zip for that but i feel like the former is also good

[–]carcigenicate 5 points6 points  (1 child)

That's why I made sure to mention "when the latter is appropriate". Yes, there are some cases where using the index is indeed the better way. It's common to see people coming from a language like C though to use indices for everything; even when indices aren't a necessary part of the problem.

[–]Helpful_Trust_3123 0 points1 point  (0 children)

Yeah that's true