Python-Invalid syntax does not highligt error
<p>I've been working on this code and when I test it, it says there is a syntax error but it does not highlight my error in IDLE. Any ideas?</p>

<pre><code>import os
import sys
Start=True
while Start==True:
    Operation=input("Please select from the following operations\n"
                          "Add\n"
                          "Subtract\n"
                          "Note: Please type the option exactly as on\nscreen or you will recieve an error message.")
    if Operation==not(in("Add","Subtract")):
        print("That is not a mathmatical operation.\nPlease try again.")
        time.sleep(2)
        os.sys("cls")
    while Operation==str("Add"):
        print("You have selected Addition!")
        time.sleep(2)
        os.sys("cls")
</code></pre>

<p>The error is in the line:</p>

<pre><code>if Operation==not(in("Add","Subtract")):
</code></pre>

<p>The correct code should be:</p>

<pre><code>if Operation not in("Add","Subtract"):
</code></pre>

<p>You also should add <code>import time</code> at the beginning of your code for the <code>time.sleep</code> to work.</p>

python syntax-error