read()
read() is a python function gets used to reading the content from the file.
fileobject = open("data.csv", "r")
print(fileobject.read())
fileobject.readline() will read entire contents from the csv
if you want to read the part of the line then you need to pass the number of bytes.
fileobject = open("data.csv", "r")
print(fileobject.read(10))
read(10) is used to read 10 bytes from the file.
readline()
readline() is python function get used to read the line from the file .
fileobject = open("data.csv", "r")
print(fileobject.readline())
fileobject.readline() will read first line from the csv
if you want to read the part of the line then you need to pass the number of bytes .
fileobject = open("data.csv", "r")
print(fileobject.readline(10))
readline(10) is used to read 10 bytes from the first line.