Use a String-list rather than multiple "OR" statements

Use a String-list rather than multiple "OR" statements

The question I have is if I can make an arbitrary string list:

  1. ZOO={"cat", "dog", "bird"}

And reference that against a database:

  1. For each row in DATABASE [ZOO.contains(animal)]
  2.   {
  3.      //some code
  4.   }

...would return true if the animal column is cat, dog or bird. I cannot figure out how to do this, or if it's even possible. The only way I know how to do this is using lots of OR's, and it looks inefficient:

  1. for each r in DATABASE  [((animal == "cat" || animal == "dog") || animal == "bird")]
  2.     {
  3.       //some code
  4.     }
Thanks

John M. Whitney