Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

object creation using class constructor

class Employee:
                def __init__(self, name):
                                self.name = name

E1=Employee("Employee name1")
print(E1.name)
Source by www.hackerearth.com #
 
PREVIOUS NEXT
Tagged: #object #creation #class #constructor
ADD COMMENT
Topic
Name
6+7 =