If I have a list of items like this:
local items = { \"apple\", \"orange\", \"pear\", \"banana\" }
how do I check if \"orange\" is in this
Lua tables are more closely analogs of Python dictionaries rather than lists. The table you have create is essentially a 1-based indexed array of strings. Use any standard search algorithm to find out if a value is in the array. Another approach would be to store the values as table keys instead as shown in the set implementation of Jon Ericson's post.