PythonBuilt-indir
vars

dirBuilt-in

id

Returns a list of names in the current scope or of an object's attributes.

Syntax

dir(object?)

Example

Enter values below to update the example in real time.

print
dir
print(dir([]))
# ['__add__', '__class__', ..., 'append', 'clear', 'copy', ...]