.txt

read(n)
filevar.read()

Reads and returns a string of n characters, or the entire file as a single string if n is not provided.

readline(n)
filevar.readline()

Returns the next line of the file with all text up to and including the newline character. If n is provided as a parameter than only n characters will be returned if the line is longer than n.

readlines(n)
filevar.readlines()

Returns a list of strings, each representing a single line of the file. If n is not provided then all lines of the file are returned. If n is provided then n characters are read but n is rounded up so that an entire line is returned

SuperMade with Super