R

Ram Sharma • 3.40K Points
Extraordinary

Q. How do you access class attributes?

  • (A) object.attribute
  • (B) class.attribute
  • (C) self.attribute
  • (D) All of the above
  • Correct Answer - Option(D)
  • Views: 4
  • Filed under category Python
  • Hashtags:

Explanation by: Ram Sharma
Attributes can be accessed via object, class (if it's a class variable), or `self` inside methods.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.