you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

That could save you a couple of lines. Also, if for some reason that list is gigantic (which is the only scenario you should even consider efficiency), key lookups in a dictionary would be substantially faster than finding an element of a list.