πŸ“Š Python
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

πŸ‘οΈ
44
Total Visits
πŸ“½οΈ
8 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
91%
Success Rate