title: In Python, what is a good way to round towards zero in integer division?
body: <pre><code>1/2
  </code></pre>
  
  <p>gives</p>
  
  <pre><code>0
  </code></pre>
  
  <p>as it should. However,</p>
  
  <pre><code>-1/2
  </code></pre>
  
  <p>gives</p>
  
  <pre><code>-1
  </code></pre>
  
  <p>, but I want it to round towards 0 (i.e. I want -1/2 to be 0), regardless of whether it's positive or negative. What is the best way to do that?</p>