Which function can you use on an object to see its available built-in methods and attributes?
- dir()
- print banner
- split
- format
Explanation: The dir() function is a built-in Python helper utility used to inspect the properties of an object. When you pass an object to the dir() function, it returns a comprehensive list of all the attributes and built-in methods associated with that specific object. For instance, using dir(str) would display all available methods for manipulating strings, such as upper(), lower(), and split().
Related exam: Modules 21 – 22: Checkpoint Exam: Programmability Answers (CCNP ENCOR v9)
