• lime!@feddit.nu
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 months ago

    i was gonna suggest the classic

    re.match(r"^(..)\1*$", "0" * abs(i)) is not None