ans = solve(...)
for k in ordered(ans):
print(k, ans[k])--
Just out of curiosity, will that solution execute ordered(ans) once or every turn of the loop?
David
You could also turn that dict into an ordered list with `ans = list(ordered(ans.items()))`.