import keyword


def is_identifier(ident: str) -> bool:
    """Determines if string is valid Python identifier."""

    if not ident.isidentifier():
        return False

    if keyword.iskeyword(ident):
        return False

    return True