just `for key,value in sorted(pr_data.items())` should work too (sort on default first element)