6 lines
191 B
Python
6 lines
191 B
Python
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")) |