rounded_number = round(a_number, significant_digits - int(math.floor(math.log10(abs(a_number)))) - 1)
>>> round(1234, -3) 1000.0