How to sort list

Paddy paddy3118 at netscape.net
Tue Nov 21 23:25:23 CET 2006


Lad wrote:

> I have a list of emails and I would like to sorted that list by domains
> E.g.
> If the list is
>
> Emails=['a at hotmail.com','a at yahoo.com','b at hotmail.com','c at yahoo.com',....]
>
> after sorting I would like to have
> Emails=['a at hotmail.com','b at hotmail.com','a at yahoo.com','c at yahoo.com',....]
>
> What is the best/easiest way?
>
> Thank you for help
> L.

What have you tried?
What issues did you have with your attempts?

- Paddy.




More information about the Python-list mailing list