![]() ![]() |
Conceptual Review (page 12 of 55) |
The type() function is used to determine an object's class or data type. Given that everything in Python3 is an object, this function can help us debug and determine what actions we can take on an object. The type of object will determine what properties, methods, and functions are available.
The dir() function will show all of the available methods, properties, and functions available for an object (e.g., dir('tom') will display all attributes and methods available for the 'tom' string object).
Executing help('modules') will display all of the installed modules and packages with the current interpreter (i.e., the interpreter attached to the PyCharm project).