Hello, Thanks for reporting. I've just fixed this issue in master (commit 6149b6cb6).
The problem was that ob-python adds tab indentation to the code body before putting it inside a main() function, which adds spurious indentation to multiline strings passed through :var. I fixed the issue by moving variable assignment from the code body to the code preamble, which is executed outside the main() function. Best, Jack Štěpán Němec <step...@gmail.com> writes: > Recipe: > ------- > > emacs -Q > M-x load-library RET ob-python RET > M-x org-mode RET > > #+begin_src python :var text="a\nb\nc" > return text > #+end_src > > #+RESULTS: > : a > : b > : c > > > Commentary: > ----------- > > ob-python seems to prepend a TAB character to every line except for the > first one. > > Emacs : GNU Emacs 28.0.50 (build 11, x86_64-pc-linux-gnu, GTK+ Version > 3.24.14, cairo version 1.17.3) > of 2020-03-11 > Package: Org mode version 9.3.6 (release_9.3.6-397-ga08960 @ > /home/stepnem/.emacs.d/lib/org/lisp/)