This is a good case of where you should possibly split this up into two scripts because the saving may be useful elsewhere.
Back on to your question; there is a wait for node that will only push the code block information out after it has got both sets of information into it. I cannot remember what package it is from, but it uses the premise that a python node will not run until it has all information in so you just use a python node as a direct in and out.
Or you do something as per the link given about at the very last post(Dynamo Player Input Order)