why can't return assignment statement : <p>In IDLE,
I write a function and intend to return a value. but it can't return</p>

<pre><code>&gt;&gt;&gt; def grade(value):
    if value &gt; 100:
        return (value=100)
    if value &lt;0:
        return (value=0)

SyntaxError: invalid syntax
</code></pre>

<p>why can't return? but when I change to</p>

<pre><code>value = 100
return value
</code></pre>

<p>It can work</p>
