- 'cmp' as a parameter to the sorted() function doesn't exist anymore.
- Instead, we should use 'key', which tells the sorted() function what to sort by.
- Per https://docs.python.org/3/howto/sorting.html#key-functions, we can define a function
to be run against each item in the iterable that will return a value that sorted() will
sort by.
- Since the original function seems to compare lengths in the hostname entries, we can actually
make fqdn_sort_fn() a great deal simpler than it was and get largely the same results.