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
Amazing tool Auto Copy paste Clipboard Using Python
Python Program to check Prime Number
Python Program to Remove Empty Strings from a List
Python program will print 1 to 10 numbers using while loop
Python program to print odd numbers between 1 to 10 using while loop.