Question: The first way to read text from a file is shown in the listing at the bottom of page 112. On line 4 of that

The first
way to read text from a file is shown in the listing at the bottom of page 112. On line 4 of that listing
we see: content = infile.read()
After this line of code is executed, what would type(content) return?
def numChars(filename): 'returns the number of characters in file filename! infile = open(filename, 'r') content = infile.read() infile.close() return len(content)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
