Why can't I execute such code in my Python shell?
<p>Why am I not able to run the following lines in my shell?</p>

<pre><code>&gt;&gt;&gt; try:
...     x = int("a lot")
... except items["error"] as e:
...     # Same as except ValueError as e
...     print("Couldn't convert")
</code></pre>

<p>Error message:</p>

<pre><code>&gt;&gt;&gt; try: ... x=int("a lot") File "&lt;stdin&gt;", line 2 x=int("a lot")&lt;&amp;&gt;
         ^ 
IndentationError: expected an indented block 
</code></pre>
