Attributes are values associated with the object. : Attribute : Class PYTHON TUTORIALS


PYTHON TUTORIALS » Class » Attribute »

 

Attributes are values associated with the object.


# Methods are callable functions that perform an operation on the object. 
# Attributes and methods of an object can be accessed using the dot '.' syntax:

class test(object):
   def printNum(self):
      print self.num

t = test()
t.num = 4
t.printNum()



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Class
» Attribute