Skip to main content
11 events
when toggle format what by license comment
Nov 10, 2017 at 7:15 history edited Thunderkatz CC BY-SA 3.0
Added new element to solution for extra case
Nov 10, 2017 at 5:57 history edited Thunderkatz CC BY-SA 3.0
added/replaced relevant info for OP
Nov 10, 2017 at 5:51 history edited Thunderkatz CC BY-SA 3.0
added/replaced relevant info for OP
S Nov 9, 2017 at 19:05 history suggested Sᴀᴍ Onᴇᴌᴀ CC BY-SA 3.0
update grammar, formatting
Nov 9, 2017 at 19:03 comment added Thunderkatz In an interview, it's very important to answer the exact question asked and not introduce new constraints for yourself.
Nov 9, 2017 at 19:00 review Suggested edits
S Nov 9, 2017 at 19:05
Nov 9, 2017 at 19:00 comment added Peilonrayz Change dictionary to dict(reversed(list(enumerate('one two three four five six seven eight nine ten'.split(), start=1)))) and it no longer prints the same. Sure their text didn't specify a second order, but their code does.
Nov 9, 2017 at 18:56 comment added Thunderkatz It prints the exact same list the OP provided. Besides, the question makes no mention of an additional search criterion being the value of the keys. It merely mentions sorting by one criterion, the length of the dict's iterable value.
Nov 9, 2017 at 18:54 review First posts
Nov 9, 2017 at 19:00
Nov 9, 2017 at 18:53 comment added Peilonrayz This isn't the same as the original, yours doesn't guarantee that (10, 'ten') comes after (1, 'one').
Nov 9, 2017 at 18:49 history answered Thunderkatz CC BY-SA 3.0