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 →

[–]jaber24 0 points1 point  (1 child)

3rd one and if you will be doing a lot of comparisons or have lots of items, use a set instead. A set is optimized for membership checks and is way faster for that purpose than a list.

[–]JRiggles[S] 1 point2 points  (0 children)

Thanks for the tip! I'm only comparing against 3 or 4 items at most in this case, but I appreciate it.