Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- inputs = [
- [1, 3, 5],
- [2, 4, 6],
- [100, 0, 101, 1000],
- []]
- def multisort(inputs):
- result = []
- for i in inputs:
- result = result + i
- result.sort()
- for r in result:
- yield r
- for i in multisort(inputs):
- print i
- # prints 0 1 2 3 4 5 6 100 101 1000
Add Comment
Please, Sign In to add comment