import re


def extract_nterm_mods(seq):
    """
    Extract nterminal mods, e.g. acA.

    Args:
        seq: str, peptide sequence

    Returns:
        ar-like, list of modifications
    """
    # matches all nterminal mods, e.g. glD or acA
    nterm_pattern = re.compile(r'^([a-z]+)([A-Z])')
    mods = []
    # test each sequence for non-AA letters
    for ii, seqi in enumerate(seq):
        nterm_match = re.findall(nterm_pattern, seqi)
        # nterminal acetylation
        if len(nterm_match) != 0:
            mods.append([nterm_match[0][0]])
    return mods