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

    i was gonna suggest the classic

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