Q. What does `dir()` function do?

  • (A) Deletes a variable
  • (B) Lists attributes and methods of an object
  • (C) Returns the directory path
  • (D) Creates a directory
πŸ’¬ Discuss
βœ… Correct Answer: (B) Lists attributes and methods of an object
Explanation: `dir()` lists the attributes and methods of an object.
Explanation by: Mr. Dubey
`dir()` lists the attributes and methods of an object.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
87
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
81%
Success Rate