may help you . Here is a general function that solves your problem. It converts the value to cents and distributes them evenly into nr_variables, the remainder are put in the first variables until all spent. The function returns a list of values.
def f(nr_variables, value):
cents = value*100
base = cents//nr_variables
rem = int(cents%nr_variables)
return [(base+1)/100]*rem + [base/100]*(nr_variables-rem)
var1,var2,var3 = f(3,5)
What is the best way to check if a bunch of variables are equal to some value? ie. are a,b,c,d are all equal to 3