import ntpath


def get_filename_and_ext(path):
    """
    >>> get_filename_and_ext("AI-replica/ai_replica/skills/translate.py")
    ('translate', 'py')

    """
    basename = ntpath.basename(path)
    filename, ext = basename.split(".")
    return filename, ext