While i'm aware of `git diff --word-diff=porcelain`, i still think it is easier to compare two files with one element per line, if they are sorted (which is the case here, hence the list vs dict, an ordered dict can work though).
I don't think changing this is worth anything, this function is meant to run once before each release, and having each code:country on each line is far easier to read.