Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import heapq
- pares = [2, 4, 6, 10, 18]
- impares = [1, 3, 7, 9, 13, 17]
- for elmt in heapq.merge(pares, impares):
- print(elmt, end=' ')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement