Sort using a custom comparator: Difference between revisions

Content added Content deleted
(Added 11l)
Line 15: Line 15:
{{trans|Python}}
{{trans|Python}}


<lang 11l>V strings = ‘here are Some sample strings to be sorted’.split_py()
<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>