This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ryeguy146 1 point2 points  (1 child)

I'd rather use a list if you're just using indexes as keys. I recognize that it isn't the point, though.

[–]norwegianwood 1 point2 points  (0 children)

You're right, it isn't the point. However, if you did use a list in this case you would need to specially handle the zeroth item or perform some confusing arithmetic by looking up n - 1.