Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {"abc123", "abc6", "abc47", "abd49"} -> {"abc6", "abc47", "abc123", "abd49"}
- {"foo0", "bar12", "foobar12", "foo"} -> { "bar12", "foo", "foo0", "foobar12"}
- {"Bond007", "Bond07", "Bond7", "Bond12"} -> {"Bond007", "Bond07", "Bond7", "Bond12"}
- {"one1", "one11two23", "one1two2", "one1two3", "1"} -> {"1", "one1", "one1two2", "one1two3", "one11two23"}
- fØD$V$,$Þ
- fØD$V$,$Þ Main Link
- Þ Sort with key:
- fØD Filter to keep only digits
- V Jelly-eval the result
- , Pair with original string (for tiebreak)
- $ $ $ (Link combiners, syntax thing)
- ΣDþïs)}
- ΣDþïs)} Full Program
- Σ } Sort by result of key: a
- D a, a
- þ digits_only(a), a
- ï int(digits_only(a)), a
- s a, int(digits_only(a))
- ) [a, int(digits_only(a))]
Add Comment
Please, Sign In to add comment