I have the following below code, which works as :
num = 191360.789242721
round(num , -3)/1000
>>> 191.0
But how I can round UP and get 192.0
?
You can use math.ceil()
as a ready-made solution or do it manually with a reverse floor division:
num = 191360.789242721
num_ceil = -(-num // 1000) # 192.0