class other 4

This commit is contained in:
Mert Gör 🇹🇷 2023-06-25 16:12:07 +03:00
parent a349412548
commit 6ed999ad1f
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9

View 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