python dict sort, terminal longest line in a file