← Back to Files
Question 411
Characters In A File
Characters In A File
The line read from input and a fixed line end are written to size.txt, each followed by a newline. Open the file for reading, read everything with f.read() into text and print the length of that string: every character counts, including the newline that ends each line. Input: one line, no prompt.
Expected Output:
8= newline. The output ends with a newline — print one after the last line.
Hints3 available
Sign in to use hintsTopics:
Files
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.