Walking through Directories - Python

How to write a Python Program to Walking through Directories - Python ?


Solution:

#!/usr/bin/env python

import os
for root, dirs, files in os.walk('/home/user'):
    print root, dirs, files


Learn More :