shipping_cost(rate_per_kg, fixed_fee, weight), use functools.partial to build standard = partial(...) (rate 40, fee 50) and express = partial(...) (rate 90, fee 100) inside a function make_calculators() that returns both as a tuple. Each returned callable takes only weight.std, exp = make_calculators(); std(2)
130
40×2 + 50 = 130 for standard shipping of 2 kg.
partial(f, a, b) pre-fills the leading positional args.
Order of parameters in shipping_cost matters.