I come from a computer science background and trying to properly document the following python if statement.
for char in X:
if char in "abcdefghijklmnopqrstuvwxyz":
return true
break
Here I am checking if the string contains any of the alphabet characters. No matter the position or frequency, it's true as long as X contains any member of "abcdefghijklmnopqrstuvwxyz". When X = "hello" is true. X = "123" is false. And X = "hello 123" is true.
How would I mathematically denote this? I don't think the following is possible as it checks if the entire $X$ sequence is a member of $g$.
$g = \{a, b, c, \dots, z\}$
if $X \in g$ then
Would it be a subset? if $X \subset g$ then
Preferably I wouldn't have to denote the character loop as it's an unimportant detail. Just if the string contains any alphabet character
Let s be a string, S the set of the symbols in s,
and A the set of all letters of the alphabet.
That s contains a letter is expressed
S $\cap$ A is not empty.