Created
July 7, 2018 03:05
-
-
Save Fhernd/f8b1a589f2ca34bb196d03855dde6f88 to your computer and use it in GitHub Desktop.
Recorrido parcial de un archivo. OrtizOL.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import partial | |
REGISTROS_A_LEER = 5 | |
with open('fibonaccis.txt', 'rb') as f: | |
registros = iter(partial(f.read, REGISTROS_A_LEER), b'') | |
for registro in registros: | |
print(registro) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment