san wrote:
>
> Please let me know how to sort the list of String in either ascending /
> descending order without considering
> special characters and case.
> ex: list1=['test1_two','testOne','testTwo','test_one']
> Applying the list.sort /sorted method results in sorted list ['test1_two',
> 'te
On 2012-11-27 17:31, san wrote:
Please let me know how to sort the list of String in either ascending /
descending order without considering special characters and case.
ex: list1=['test1_two','testOne','testTwo','test_one']
Applying the list.sort /sorted method results in sorted list ['test1_tw
Please let me know how to sort the list of String in either ascending /
descending order without considering special characters and case.
ex: list1=['test1_two','testOne','testTwo','test_one']
Applying the list.sort /sorted method results in sorted list ['test1_two',
'testOne', 'testTwo', 'test_o
In article <[EMAIL PROTECTED]>,
"Lad" <[EMAIL PROTECTED]> wrote:
> I have a list of emails and I would like to sorted that list by domains
> E.g.
> If the list is
>
> Emails=['[EMAIL PROTECTED]','[EMAIL PROTECTED]','[EMAIL PROTECTED]','[EMAIL
> PROTECTED]',]
>
> after sorting I would like
Fredrik Lundh wrote:
> note that DSU is built into Python these days:
>
> L.sort(key=transform)
Sweet, thanks for the hint.
Cheers,
--
Klaus Alexander Seistrup
http://klaus.seistrup.dk/
--
http://mail.python.org/mailman/listinfo/python-list
Klaus Alexander Seistrup wrote:
> Decorate-sort-undecorate?
>
> #v+
>
> array = []
>
> for addr in Emails:
> (user, domain) = addr.split('@')
> array.append((domain, user, addr))
> # end for
>
> array.sort()
>
> SortedEmails = [addr for (user, domain, addr) in array]
>
> #v-
note that D