Python Patterns Using Nested If In Excel