AD_Taylor
Well-known Member
- Joined
- May 19, 2011
- Messages
- 687
Hi,
Is there a quick way to search, for example a string array, to see if it contains a searched for string?
Something like:
Array = cat, dog, pigeon, horse, rabbit
Search for any of these, e.g. pigeon returns True?
Theres the obvious loop through the array with an If statement and a Boolean variable to record whether the value is found, but wondered if something quicker and easier was available?
Thanks,
Adam
Is there a quick way to search, for example a string array, to see if it contains a searched for string?
Something like:
Array = cat, dog, pigeon, horse, rabbit
Search for any of these, e.g. pigeon returns True?
Theres the obvious loop through the array with an If statement and a Boolean variable to record whether the value is found, but wondered if something quicker and easier was available?
Thanks,
Adam