Below are the settings that helped me for writing python programs in vim terminal.
cat /home/richard/.vimrc
syntax on
filetype indent plugin on
set modeline
set tabstop=8 expandtab shiftwidth=4 softtabstop=4
filetype indent on
set nu
Benefits like auto-indentation will populate automatically without the need of providing space in each line.
More information@ full stack python
More information