title: Round to the nearest 500, Python
body: <p>I'm looking to find a way to round up to the nearest 500.I've been using:</p>
  
  <pre><code>math.ceil(round(8334.00256 + 250, -3))
  </code></pre>
  
  <p>Whereby I have a value from a scale in a map I am making in ArcGIS. I have the ability to read and write the scale factor (i.e. 1:8334....basically, you set the thousandth and it defaults to a ratio) If the scale factor isn't a factor of 500, I want to round up to the next 500. The math.ceil will round up any decimal value, and the round(n,-3) will round to the nearest thousandth, but I'm struggling to find a way to round to the nearest 500.</p>
  
  <p>Any suggestions?
  Thanks,
  Mike</p>