Python - use AND or OR in this code?
<p>I'm writing a simple code to get some easy practice in Python, just to find the maximum out of three numbers, without using the max function.</p>

<p>I wrote this:</p>

<pre><code>num1 = int(input("Enter the first number: "))
num2 = int(input("Enter the second number: "))
num3 = int(input("Enter the third number: "))

def max_of_three(num1,num2,num3):
    if num1&gt;num2 and num1&gt;num3:
        return num1
    elif num2&gt;num1 and num2&gt;num3:
        return num2
    elif num3&gt;num1 and num3&gt;num2:
        return num3

print (max_of_three(5,7,2))
</code></pre>

<p>For this specific piece of code, is there a difference between using AND and OR when comparing two numbers? Obviously in other code there's an important difference, but does it matter in getting the result here?</p>

<p>Also I know there's easier ways to write this, but I'm just trying to get back into writing Python.</p>

<p>Replies are appreciated.</p>