Don't as that would be a code injection vulnerability and also avoid passing passwords in arguments to commands, as they then become public by showing in the output of `ps` and they are sometimes logged in some audit logs.
Using environment variables is usually better:
PASSWORD="$Password" python3 -c 'import os, crypt
print(crypt.crypt(os.getenv("PASSWORD"), crypt.mksalt(crypt.METHOD_SHA512)))'
(here using the `VAR=value cmd` syntax as opposed to `export VAR` so the environment variable is passed only to that one command invocation).