Nested And Function In If Function Python