Sort using a custom comparator: Difference between revisions
Content added Content deleted
Alextretyak (talk | contribs) (Added 11l) |
Alextretyak (talk | contribs) m (→{{header|11l}}) |
||
Line 15: | Line 15: | ||
{{trans|Python}} |
{{trans|Python}} |
||
<lang 11l>V strings = ‘here are Some sample strings to be sorted’. |
<lang 11l>V strings = ‘here are Some sample strings to be sorted’.split(‘ ’) |
||
print(sorted(strings, key' x -> (-x.len, x.uppercase())))</lang> |
print(sorted(strings, key' x -> (-x.len, x.uppercase())))</lang> |