import re


def seq(ranks):
    """ Takes a string of card ranks and returns in they are in sequence."""
    # Possibilities for sequences.
    pattern = ['[A2345]{5}', '[23456]{5}', '[34567]{5}', '[45678]{5}',
               '[56789]{5}', '[6789T]{5}', '[789TJ]{5}', '[89TJQ]{5}',
               '[9TJQK]{5}', '[TJQKA]{5}']
    # If any of them is true.
    return any([re.search(x, ranks) for x in pattern])