class other 4
This commit is contained in:
parent
a349412548
commit
6ed999ad1f
1 changed files with 7 additions and 0 deletions
7
python-temel/class.sample.other.4.py
Normal file
7
python-temel/class.sample.other.4.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
class Sample:
|
||||
x = 10
|
||||
|
||||
s = Sample()
|
||||
print(s.x) # buradaki x sınıf özniteliği olan x
|
||||
s.x = 20 # artık biz örnek özniteliği olan x'e erişiyoruz
|
||||
print(s.x) # buradaki x artık örnek özniteliği olan x
|
Loading…
Reference in a new issue