A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.w3schools.com/python/ref_func_dir.asp below:

Website Navigation


Python dir() Function

Python dir() Function

❮ Built-in Functions

Example

Display the content of an object:

class Person:

name = "John"

age = 36

country = "Norway"

print(dir(Person))


Try it Yourself » Definition and Usage

The dir() function returns all properties and methods of the specified object, without the values.

This function will return all the properties and methods, even built-in properties which are default for all object.

Syntax Parameter Values Parameter Description object The object you want to see the valid attributes of

❮ Built-in Functions

Track your progress - it's free!


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4