Reuse specific lines of code
<p>Suppose I use this block of code very often in my Python file</p>

<pre><code>if x == 1:
  x += 1
else:
  x -= 1
</code></pre>

<p>Is there a way to "copy" this code, so that I don't have to type these four lines repeatedly throughout the file?</p>
