What would be the difference in execution following statements:
F=open(“MYFILE.TXT”,”r”)
i) Data = F.readlines()
ii) Data = F.read(10)
Answers
Answered by
0
Answer:
Here here is your answer in Python!
The difference would be simple.
in the (i) st statement it would store the data in each line into a list
in the (ii) nd statement, it the variable data will store the first 10 characters from the file.
Hope it helps!!
Similar questions