Courses/Advanced OOP

๐Ÿ›๏ธ Advanced OOP

classmethod & staticmethod

Alternate constructors and utility helpers.

@classmethod receives the class as first arg โ€” use it for alternative constructors. @staticmethod is just a function namespaced on the class.

main.py
Output
Press Run to execute.
Expected output
3
hi

Sign in to track your progress across lessons.