Stack Python Code Using Lists And Tables