def change_extension(file: str, new: str) -> str:
    """
    Change extension of file.
    :param file: file path to change extension.
    :param new: new file extension.
    :return: path of file with newly set extension.
    """

    return file.rsplit('.', 1)[0] + '.' + new