Only Few Seats Left for Advanced Certification Courses on Data Science, ML & AI by E&ICT Academy IIT RoorkeeApply Now
If we know the file is relatively small compared to the size of our main memory, we can read the whole file into one string using the
read method on the file handle.
fhand = open('/cxldata/datasets/project/mbox-short.txt') inp = fhand.read() fhand.close()
mbox-short.txtwhich is located at
readmethod on file handle
PS - If your logic is correct then your function should return
1910. You can use "Hint" and "See Answer" if you are stuck.
No hints are availble for this assesment
Answer is not availble for this assesment
Note - Having trouble with the assessment engine? Follow the steps listed here