Name

readline

Synopsis

                        m.readline( )

Reads and returns one line from the file of m, from m’s current file pointer up to the next '\n', included (or up to the end of m, if there is no '\n'), then advances m’s file pointer to point just past the bytes just read. If m’s file pointer is at the end of m, readline returns the empty string ''.

Get Python in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.