So need to check if a string\'s characters are ascending alphabetically and if that ascent is evenly spaced.
a = \"abc\"
b = \"ceg\"
So a i
>>> from itertools import product
>>> from string import lowercase
>>> a="abc"
>>> any(a in lowercase[i::j+1] for i,j in product(range(26),repeat=2))
True
>>> b="ceg"
>>> any(b in lowercase[i::j+1] for i,j in product(range(26),repeat=2))
True
>>> c="longer"
>>> any(c in string.lowercase[i::j+1] for i,j in product(range(26),repeat=2))
False
>>> d="bdfhj"
>>> any(d in string.lowercase[i::j+1] for i,j in product(range(26),repeat=2))
True
It's not necessary to use product, and a little more efficient to do it this way
>>> any(a in string.lowercase[i::j+1] for i in range(26) for j in range(26-i))
True