I have 2 list of values I need to compare, to separate variables, before I call a function
so variable args[0]
needs to be found in the list (orange, apple, banana, grape, strawberry, etc...) and variable args[1]
needs to be found in the list (bike, car, motorcycle, boat, etc...)
I need to find a good value for both before proceeding to the next step.
I could use a nasty looking if statement such as
if ( (args[0] == "orange" || args[0] == "apple"|| and so on) && (args[1]) == "bike" || agrs[1] == "car" || and so on) )
but that can get really ugly to work with really fast. Is there a better way to skin the cat?
I don't see any function that I can use if ( (args[0] in (apple, orange, etc...) && (args[1] in ...))
.