Advertisement
Fhernd

manejo-archivo.py

Jan 26th, 2018
553
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. archivo = open('libros.csv')
  2. contenido_archivo = archivo.read()
  3.  
  4. print(contenido_archivo)
  5.  
  6. archivo.seek(0)
  7.  
  8. print()
  9.  
  10. # Lectura parcial de 100 bytes:
  11. print(archivo.read(100))
  12.  
  13. archivo.seek(0)
  14.  
  15. print()
  16.  
  17. # Lectura todas las líneas:
  18. for linea in archivo:
  19.     print(linea)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement