8 lines
247 B
Python
8 lines
247 B
Python
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
|