ok_code now accepts python3 range and anything that has a __contains__ method