open jupyter notebook in vscode code example Example: execute jupyter notebook on .py file vs code Just add #%% a the beginning of your code