Skip to content
UPEEC

dir()

Lists the attributes and methods of an object (or the names in the current scope).

Beginner
Comments 0

dir(str) shows every string method — a quick way to explore an unfamiliar object.

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.