Guest User

Untitled

a guest
Nov 21st, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. inputs = [
  2. [1, 3, 5],
  3. [2, 4, 6],
  4. [100, 0, 101, 1000],
  5. []]
  6.  
  7. def multisort(inputs):
  8. result = []
  9. for i in inputs:
  10. result = result + i
  11.  
  12. result.sort()
  13. for r in result:
  14. yield r
  15.  
  16. for i in multisort(inputs):
  17. print i
  18.  
  19. # prints 0 1 2 3 4 5 6 100 101 1000
Add Comment
Please, Sign In to add comment