mutable.py

This commit is contained in:
Mert Gör ☭ 2023-06-22 23:08:04 +03:00
parent 0a5a323d58
commit 318cd0c0ba
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9
1 changed files with 11 additions and 0 deletions

11
python-temel/mutable.py Normal file
View File

@ -0,0 +1,11 @@
class Sample:
def __init__(self):
self.a = 10
self.b = 20
s = Sample()
print(s.a, s.b) # 10, 20
s.a = 100
s.b = 200
print(s.a, s.b) # 100, 200