I want to create an org
file with two sections, that reads in that order but
"tangles" first the second section. For example, if my org file is
* Generic section
#+BEGIN_SRC python :tangle yes
print(a+4)
#+END_SRC
* Preparation
#+BEGIN_SRC python :tangle yes
a = 4
#+END_SRC
the tangled output should be
a = 4
print(a+4)
One option would be using noweb syntax to input the first code block into the second, and avoid tangling the first block, but in the generated pdf I would have a codeblock with the full code and another one with only the second line. The pdf should be something like
Generic section
print(a+4)
Preparation
a = 4
How can I achieve this result?