I work with python a lot and recently learned you can use this
%! python
If the buffer you have open is a python script. Doesn’t work great if you have a bunch of stdout to read, but good for quick tests