Here is a working example of dir() on a module. We have a class called Car.py, let us import Car and assign to dir() to see the output. The output gives us the name of the class and all the functions defined in Car.py. You can also try using dir() on a built-in module available in Python.