Source Code:
(back to article)
class MyClass: # This is a class variable class_variable = "This is a class variable" def __init__(self, value): # This is an instance variable self.instance_variable = value print(MyClass.class_variable)
Result:
Report an issue