python-CSD-kursu/python-temel/class.sample.other.4.py
2023-06-25 16:12:07 +03:00

7 lines
247 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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