Python Program to List all the Files in a Directory with Size

In this example, we will write a python program to get the size of the files inside a directory. To better understand this example, make sure you have knowledge of the following tutorials:-

The code for the program is as below:-

The output of the above program is:-

test.py : 278 bytes
about.txt : 293 bytes
hello.txt : 81 bytes

SHARE Python Program to List all the Files in a Directory with Size

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

Share