Question: Write a function stats() that takes one input argument: the name of a text file. The ;function should print, on the screen, the number of
Write a function stats() that takes one input argument: the name of a text file. The ;function should print, on the screen, the number of lines, words, and characters in the file .your function should open the file only once stats('example.txt') >>> line count: 3 word count: 20 character count: 98
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
