Patterns Using Nested Loops In Python