Q. What does the `self` keyword in a class method refer to?

  • (A) The parent class
  • (B) The object itself
  • (C) The class
  • (D) A local variable
πŸ’¬ Discuss
βœ… Correct Answer: (B) The object itself
Explanation: `self` represents the instance (object) of the class.
Explanation by: Mr. Dubey
`self` represents the instance (object) of the class.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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