Python: Why does the '0' in my if statement need parentheses to render true? : <p>I am brand new to Python and coding in general. I attempted to look up my question before asking... It's either I didn't look hard enough (I hope not) or didn't know what to search.</p>

<p>So, I am attempting to learn Python from YouTube (please don't yell at me) and I've been emulating the teacher's code and didn't understand one part of the if statement.</p>

<pre><code>def helloWorld(myString):
    print(myString)
    myName = input("What is your name? ")
    myVar = input("Enter a number: ")
    if(myName == "Matthew" and myVar == 0):
        print("Matthew is great")
    elif(myName == "Bob"):
        print("Bob is ok")
    else:
        print("hello world")
helloWorld("Hello function world")
helloWorld("Hello 123 world")
</code></pre>

<p>When i run it in the terminal...</p>

<p><code>Hello function world
What is your name? Matthew
Enter a number: 0
hello world
Hello 123 world
What is your name? Matthew
Enter a number: 1
hello world
</code></p>

<p>My question is about the <code>if(myName == "Matthew" and myVar == 0):</code> statement. I made sure both parameters were met on the if statement. But, it's outputting <code>hello world</code>. Can someone explain to me why if I put parentheses around the <code>0</code> it'll render the if statement true and output <code>Matthew is great</code>? As soon as I take the parentheses off the <code>0</code>, it'll render the if statement <code>true``false</code>. Hopefully, I was clear and concise about my question. Thank you in advance.</p>
