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

    i was gonna suggest the classic

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