As I move to python as my primary programming language, I am discovering new things about the modules that i have used for many years, one such module is the shutil.
To check free disk space, one can use the following command
_, _, free = shutil.disk_usage("")
shutil.disk_usage returns the disk usage statistics about a given path
Returned values is a named tuple with attributes ‘total’, ‘used’, ‘free’, which are the amount of total, used and free space in bytes.