Hi list, I have a list of URL and I want to sort that list by the domain name.
Here, domain name doesn't contain subdomain, or should I say, domain's part of 'www', mail, news and en should be excluded. For example, if the list was the following ------------------------------------------------------------ http://mail.google.com http://reader.google.com http://mail.yahoo.co.uk http://google.com http://mail.yahoo.com ------------------------------------------------------------ the sort's output would be ------------------------------------------------------------ http://google.com http://mail.google.com http://reader.google.com http://mail.yahoo.co.uk http://mail.yahoo.com ------------------------------------------------------------ As you can see above, I don't want to Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list