If you just want a keybinding to run something in the terminal, try:
{
"key": "alt+x", // whatever keybinding you choose
"command": "workbench.action.terminal.sendSequence",
// "args": {"text": "python ${file}\u000d"}
"args": {"text": "python MyFileName\u000d"}
}
${file} would always run the current file, which you do not want so replace ${file} with your filename that you do want to run.
\u000d is a return so it runs immediately.
See send text to terminal with a keybinding. In addition to a hard-coded reference to some filename, you can also use vscode's variables.