python syntax error although syntax is correct : <p>For the following python function:   </p>

<pre><code> def startElement(self, tag, attributes): 
        if tag == "artikel":
            print("&lt;tr&gt;&lt;td&gt;{}&lt;/td&gt; &lt;td&gt;".format(attributes["id"])
        if tag == "preis":
            print("&lt;/td&gt; &lt;td&gt;")
        if tag == "lieferant":
            print("&lt;/td&gt; &lt;td&gt;")
</code></pre>

<p>I get the following syntax error:</p>

<pre><code>  if tag == "preis":
                   ^
  SyntaxError: invalid syntax    
</code></pre>

<p>I have no idea at all what's supposed to be wrong with the syntax here.
Does anybody else know what's up here?</p>
