If the formatting (white space, new lines, indentation) of the code matters, use the pre element in combination with the code element:
<pre>
<code>
x = 42
if x == 42:
print "x is … … 42"
</code>
</pre>
You still have to esc...