Home / Python Tips Generated By ChatGPT / The dir() Function in Python Explore the attributes and methods of an object. Source Code print(dir([])) # Lists all methods and attributes of a list object