python:programmes:file_read
Ceci est une ancienne révision du document !
Lire un fichier ligne par ligne en utilisant les iterations
<code python> with open('mydata.txt') as fp:
for line in iter(fp.readline, ''): process_line(line)
<python>
python/programmes/file_read.1370129481.txt.gz · Dernière modification : 2013/06/01 23:31 de root