In this program we will be creating a Python Program to Check size of a file In this Program we will be using the os module. Also, note the file size in Bytes. At first, we have to import os module. we have to write file_statics = os.stat(code.txt) it will check the file size of only txt file.
Python Program to Check size of a file [Source Code]
import os file_statics = os.stat('Code.txt') print(file_statics.st_size)
In case of any doubt feel free to ask me on social media