Nested Decision Structures Python