List the methods associated with an object in Python.
Use <dir( )> to know what methods an object offer to you.
Python’s built-in function is good when we need to discover, remember or confirm that a method exists and is associated with the object we are working with.
The dir( ) will list what you can do. From there, you can use it (if you already know) or research more about the method on the Internet.
When you come across a new type of object in Python or even familiar ones, but you’re looking for a specific function, dir( ) comes in handy.
In the output, there are usually several results starting with __, which are for Python internal use and you can just disregard.