num++ marked as syntax error in python - why? : <p>Consider the following xml file (lieferungen2.xml):</p>

<pre><code>&lt;?xml version="1.0"?&gt;
&lt;lieferungen&gt;
    &lt;artikel id="1"&gt;
       &lt;name&gt;apple&lt;/name&gt;
       &lt;preis &gt;2&lt;/preis&gt;
       &lt;lieferant&gt;Friedman&lt;/lieferant&gt;
    &lt;/artikel&gt;
&lt;/lieferungen&gt;
</code></pre>

<p>With the following code, I wanted to print "apple" to the command line:</p>

<pre><code>import xml.dom.minidom 

dom = xml.dom.minidom.parse("lieferungen2.xml")

a = dom.getElementsByTagName("artikel")

num=0


while(True):

    if a[0].childNodes[num].nodeName != "name":
        num++
    else:
        break

print(a[0].childNodes[num].childNodes[0].nodeValue)
</code></pre>

<p>However, I get the following error message:</p>

<pre><code>    num++
        ^
SyntaxError: invalid syntax
</code></pre>

<p>To me this syntax looks perfectly fine? What's wrong here?</p>
