Open 1harshit234 opened 2 weeks ago
os.path.getsize('file_path'): Return the file size in bytes. os.stat(file).st_size: Return the file size in bytes Pathlib module:
pathlib.Path('path').stat().st_size: Return the file size in bytes.
https://pynative.com/python/file-handling/
isske sare importnat files
how to open and check the exietence of the file by the help of the op path , path lib os.path.isfile('file_path'): Returns True if the path is a regular file. os.path.exists('file_path'): Returns True if the path is a file, directory, or a valid symlink. os.path.isdir('file_path')