dir() function in Python
The dir() function is a built-in Python tool used to list the attributes (like methods, variables, etc.) of an object. It helps inspect modules, classes, functions, and even user-defined objects during development and debugging. Syntaxdir([object]) Parameters: object (optional): Any Python object (l