Advertisement
Fhernd

iterar-colecciones-ordenadas.py

Jun 27th, 2018
1,674
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.14 KB | None | 0 0
  1. import heapq
  2.  
  3. pares = [2, 4, 6, 10, 18]
  4. impares = [1, 3, 7, 9, 13, 17]
  5.  
  6. for elmt in heapq.merge(pares, impares):
  7.     print(elmt, end=' ')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement