Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

types of methods in oop python

# Class Method Implementation in python 
class Student:
    name = 'Student'
    def __init__(self, a, b):
        self.a = a
        self.b = b 
    
    @classmethod
    def info(cls):
        return cls.name

print(Student.info())
Source by www.studytonight.com #
 
PREVIOUS NEXT
Tagged: #types #methods #oop #python
ADD COMMENT
Topic
Name
1+7 =