If statement not evaluating all the conditions and executing anyway : <p>Ok so I am new to python and trying to learn how to code. I ran into an issue today that I don't understand. So this code executes as expected and prints the largest of the three numbers no matter what position the largest number is.</p>

<pre><code>    if num1 &gt;= num2 and num3:
        print(num1, 'Is the greatest number!')

    elif num2 &gt;= num3 and num1:
        print(num2, 'Is the greatest number!')

    else:
        print(num3, 'Is the greatest number')
</code></pre>

<p>But if i change the elif statement to this:</p>

<pre><code>    elif num2 &gt;= num1 and num3:
        print(num2, 'Is the greatest number!')
</code></pre>

<p>Even if num3 is the largest the else statement will not execute and it will display the larger number of num1 or num2. </p>
