I\'m looking to find a way to round up to the nearest 500.I\'ve been using:
math.ceil(round(8334.00256 + 250, -3))
Whereby I have a value from
Maybe something like this:
round(float(x) / 500) * 500
The "float" conversion is unnecessary if you are using Python 3 or later, or if you run the statement from __future__ import division for sane integer division.
from __future__ import division