Nested Conditions In Python Example