Stack Python Code Using Lists In Mathematica