I\'m trying to compare a string called facility to multiple possible strings to test if it is valid. The valid strings are:
facility
auth, authpriv, daem
If, OTOH, your list of strings is indeed hideously long, use a set:
accepted_strings = {'auth', 'authpriv', 'daemon'} if facility in accepted_strings: do_stuff()
Testing for containment in a set is O(1) on average.