Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

types of methods in oop python

# Static Method Implementation in python
class Student:
    name = 'Student'
    def __init__(self, a, b):
        self.a = a
        self.b = b 
    
    @staticmethod
    def info():
        return "This is a student class"

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