write a Python code to find the size of the file
in bytes, number of lines and numbers of Words.
Answers
Answered by
5
Explanation:
Write a Python program to get the file size of a plain file. Contain of text.txt. Sample Solution:- Python Code: def file_size(fname): import os statinfo = os.stat(fname) return statinfo.st_size print("File size in bytes of a plain file: ",file_size("test.txt")) Flowchart: Python Code Editor:
Similar questions
Social Sciences,
3 months ago
Biology,
3 months ago
English,
3 months ago
Math,
8 months ago
Physics,
8 months ago
Hindi,
1 year ago
India Languages,
1 year ago
Geography,
1 year ago