if x >2 and <5: gives me an invalid syntax error. I dont understand why? : <p>I am using python 3.6 and i have written the following code:</p>

<pre><code>l=[1,2,3,4,6,7,8,9]
a=0

for i in l:
    if i &gt;2 and &lt;5:
        l[a]=l[a]+1
    a=a+1

print(l)
</code></pre>

<p>I dont understand why I get a syntax error.</p>
