Invalid Syntax error python 3.5.2
<p>I'm getting syntax error in this particular line.</p>

<pre><code>print "Sense %i:" %(i),
</code></pre>

<p><strong>Full code:</strong></p>

<pre><code>for i in range(len(meas)):
    p = sense(p, meas[i])
    r = [format(j,'.3f') for j in p]
    print "Sense %i:" % (i),
    print r,
    entropy(p)
    p = move(p, mov[i])
    r = [format(j,'.3f') for j in p]
    print "Move %i:" % (i),
    print r,
    entropy(p)
    print
</code></pre>

<p>In python 3, print is a function, you have to use brackets: <code>print("Sense %i:" %(i))</code></p>

python python-3.x syntax