• bob_lemon@feddit.org
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    2 months ago
    import re
    
    def is_even(i: int) -> bool:
        return re.match(r"-?\d*[02468]$", str(i)) is not None