Using Nested Loops To Print Patterns Python Compiler