Function Details: dir

Description


Returns a list of valid attributes for the given object.


Extended Description


The dir() function returns a list of valid attributes and methods of the specified object. If no argument is given, it returns the list of names in the current local scope. The resulting list is sorted alphabetically. For most objects, dir() lists all attributes of the object, including those inherited from its class and its class's base classes.


Read More about dir from Python Documentation

Function Signature



Module: builtins

Parameters



Parameter List


  • object: Optional[Any]

Return



Return Type


List[str]

Output

Explanation