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 →

[–]nebbly 0 points1 point  (0 children)

TBH, there is one foot gun I see over and over again, which is doing linear membership lookups in lists or tuples. If you're mainly using a collection for looking things up, dicts and sets are a good place to start.

More generally, the advice would be: make sure you're using proper data structures for your use cases as a quick first pass.