jeudi 5 novembre 2015

How to read specific line of file in python

Is there a concise way to read a specific (e.g. line #5) of a file object in python? Saying file.readline() only reads me the first line, and I only know how to use a for loop to read every single line of the file. Thanks!

Aucun commentaire:

Enregistrer un commentaire