# Set a Password for the Resultant Document Apply a password to the comparison result document so only authorised users can open it, using GroupDocs.Comparison for Python via .NET. [GroupDocs.Comparison for Python via .NET](https://products.groupdocs.com/comparison/python-net) can apply a password to the comparison result. Combine `CompareOptions.password_save_option = PasswordSaveOption.USER` with `SaveOptions.password = ""`. ## Example: Password-protect the result document {{< tabs "set-output-password">}} {{< tab "set_password_for_resultant_document.py" >}} ```python from groupdocs.comparison import Comparer from groupdocs.comparison.options import CompareOptions, SaveOptions, PasswordSaveOption def set_password_for_resultant_document(): with Comparer("./source.docx") as comparer: comparer.add("./target.docx") compare_options = CompareOptions() compare_options.password_save_option = PasswordSaveOption.USER save_options = SaveOptions() save_options.password = "3333" comparer.compare("./result.docx", save_options, compare_options) if __name__ == "__main__": set_password_for_resultant_document() ``` {{< /tab >}} {{< tab "source.docx" >}} {{< tab-text >}} `source.docx` is the source file used in this example. Click [here](https://docs.groupdocs.com/comparison/python-net/_sample_files/developer-guide/saving-results/set-password-for-resultant-document/source.docx) to download it. {{< /tab-text >}} {{< /tab >}} {{< tab "target.docx" >}} {{< tab-text >}} `target.docx` is the target file used in this example. Click [here](https://docs.groupdocs.com/comparison/python-net/_sample_files/developer-guide/saving-results/set-password-for-resultant-document/target.docx) to download it. {{< /tab-text >}} {{< /tab >}} {{< tab "result.docx" >}} ```text Binary file (DOCX, 25 KB) ``` [Download full output](https://docs.groupdocs.com/comparison/python-net/_output_files/developer-guide/saving-results/set-password-for-resultant-document/set_password_for_resultant_document/result.docx) {{< /tab >}} {{< /tabs >}} Opening `result.docx` will require the password `3333`.