Fhernd icon

recorrido-parcial-archivo.py

Fhernd | PRO | 07/07/18 03:04:48 AM UTC | 0 ⭐ | 2602 👁️ | Never ⏰ | []
Python |

210 B

|

None

|

0 👍

/

0 👎

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)

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎