Need help with a list, thanks

I’m trying to make make a program see if something equals ANY item of a list…such as


set the_marks to {"Number1", "Number2"}
display dialog "Enter:" default answer ""
set n to text returned of result
if n is equal to some item of the_marks then -- but some item of the_marks is a random item, I want it to be more like: if n is equal to ANY items of the_marks then...
...
end if

Any ideas to do this?

Like so

set the_marks to {"Number1", "Number2"}
set n to text returned of (display dialog "Enter:" default answer "")
if the_marks contains n then
	-- whatever here
end if

Something like this?

set L to {1, 3, 7, 9}
set T to text returned of (display dialog "Enter a number" default answer "")
set InList to (T as integer) is in L

James beat me to it using “contains”; I used “in”

Thanks