Apr-12-2017, 08:12 AM
(Apr-12-2017, 08:06 AM)Ofnuts Wrote: If you can do that you don't need the dic. In the original code you just use n=10**integer_length.
Yeah, that's correct and I provided 2 such alternatives in my first post. Note that there is also catch all other case (e.g. when integer_length>5).
However OP asks for a solution using dict and metulburr provided solution based on dict, which I changed further.