I waste a lot of time between Vim and Python. I find it too slow to manually copy-paste from Python to Vim and vice versa. A good broken example is:
%
if you have written your python script in a new [No Name] buffer, then you can use following:
:0,$!python
when you have a no name buffer then you can not use '%', hence the need for 0,$ which means all lines in buffer starting with line zero until the last line
output will be written in buffer and unfortunately not at the end