MCPcopy Create free account
hub / github.com/CodeWithHarry/The-Ultimate-Python-Course / Employee

Class Employee

Chapter 11/05_class_methods.py:1–6  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1class Employee:
2 a = 1
3
4 @classmethod
5 def show(cls):
6 print(f"The class attribute of a is {cls.a}")
7
8e = Employee()
9e.a = 45

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected