How to add 'Remove unused imports' Python keybinding in Visual Studio Code

In order to add the Shift-Alt-R keybinding for removing unused imports in Python files in Visual Studio Code:

    {
        "key": "shift+alt+r",
        "command": "editor.action.codeAction",
        "args": {
            "kind": "source.unusedImports",
        }
    }

Don’t forget to add a comma after the previous block.

Save the file.

Now you can press Shift-Alt-R to remove unused imports in Python files.