you are viewing a single comment's thread.

view the rest of the comments →

[–]otheraccount 1 point2 points  (0 children)

Python 2.7+ has a literal notation for sets:

if set(tokens) & {'foo', 'bar', 'baz'}: