Pythonic way of saying 'at least one of a, b, or c is in some_list'

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Sun Oct 31 19:27:28 EDT 2010


In message
<687bcb76-0093-4d68-ba56-0390a3e1e216 at 30g2000yql.googlegroups.com>, 
cbrown at cbrownsystems.com wrote:

> I should note that efficiency is not an issue to me here; this is for
> when you have, say, a list user_options of at most around 15 options
> or so, and you want to perform some action if one or more of a, b, or
> c is an option listed in user_options. Big O notation isn't so
> relevant as readability and 'naturalness'.

I must say this whole thread has turned into a massive bikeshedding 
exercise.



More information about the Python-list mailing list