Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

objects and classes in python

class IntellipaatClass:
	a = 5
	def function1(self):
		print(‘Welcome to Intellipaat’)
#accessing attributes using the class object of same name
IntellipaatClass.function(1)
print(IntellipaatClass.a)
Source by intellipaat.com #
 
PREVIOUS NEXT
Tagged: #objects #classes #python
ADD COMMENT
Topic
Name
7+9 =