I have python script with jupyter notebook mark #%%
which describe that I can run this script in visual studio code python interactive.
Acccording to this:
I have similar question because described solution does not work in my case. How to specify shortcut for jupyter notebook command 'run all' in visual studio code?
You can create your own keyboard shortcut by modifying the keybindings.json
file by clicking on
File > preferences > keyboard shortcuts
Then clicking on the link - (bottom right of the image below)
You can also install the code runner extension.
Code runner will add a play button on the top right of the vs code window, which you can click to run your code.