Every time I send a line to python console in emacs python-mode, it executes split-window-below, like this:

On most computer screen the vertical dimension is stringent, thus it's more desireable to trigger split-window-right instead, like this:

This can be done manually (c-x 1 c-x 3 c-x o c-x b), but once you execute any python code from your source file, the layout returns to the annoying one.
Is there a way to customize this persistently?
Edit:
I have tried a few things, including the answer suggested in the comment below. So far it looks the following lines in .emacs "sort of" work:
(setq split-height-threshold nil)
(setq split-width-threshold 0)
except that they will make an extra window below:

python-modebuffers only, you can simply wrap the call tosetq(last line of the code in the answer) in a function:(defun prefer-side-by-side-splits () ...)and add that function topython-mode-hookvia(add-hook 'python-mode-hook 'prefer-side-by-side-splits).