Just use string formatting.
"{:.5f}".format(232.34567836576)
> '232.34568'
Edit: Here's a super hacky way using mostly string formats:
("{0:." + str(len("{0:.5f}".format(22.34567836576))) +"}").format("{0:f}".format(22.34567836576))
22.34567
I'm not sure what the point of the exercise is. What I'm doing is truncating a string to the length of the (wrongly) rounded, formatted float.
For what I can find, there's no way of plainly formatting it. I'm sorry if this answer is invalid, had I read your rounding thing beforehand, I wouldn't have commented.