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

    i was gonna suggest the classic

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