Advertisement
Fhernd

recorrido-parcial-archivo.py

Jul 6th, 2018
1,532
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. from functools import partial
  2.  
  3. REGISTROS_A_LEER = 5
  4.  
  5. with open('fibonaccis.txt', 'rb') as f:
  6.     registros = iter(partial(f.read, REGISTROS_A_LEER), b'')
  7.  
  8.     for registro in registros:
  9.         print(registro)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement