
- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
How do I look inside a Python object?
Python has a strong set of following built-in functions to collect information about the attributes, properties and methods of any python object −
type()
dir()
id()
getattr()
hasattr()
globals()
locals()
callable()
type() and dir() are particularly useful for finding the type of an object and its set of attributes, respectively.
- Related Articles
- How do I correctly clean up a Python object?
- How do I create dynamic variable names inside a JavaScript loop?
- How do I create a java.sql.Date object in Java?
- How do I remove a property from a JavaScript object?
- How do I select elements inside an iframe with Xpath?
- How do I create a Python namespace?
- How do I unload (reload) a Python module?
- How do I copy a file in python?
- How do I delete a file in Python?
- How do I prepare for a Python interview?
- How do I do a case insensitive string comparison in Python?
- How do I install Python SciPy?
- How do I execute a string containing Python code in Python?
- How do I create a namespace package in Python?
- How do I copy a binary file in Python?

Advertisements