-
-
Save hanjae-jea/1af6e40fa01ed97dc670ad3a533c39fd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyClass: | |
myVar = 1 | |
def HelloWorld(self): | |
MyClass.myVar = 2 | |
self.myVar = 3 | |
a = MyClass() | |
print(MyClass.myVar) | |
print(a.myVar) | |
a.HelloWorld() | |
print(MyClass.myVar) | |
print(a.myVar) | |
b = MyClass() | |
print(b.myVar) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment