From 6ed999ad1f6b637b4836c7c7c4d39667ab2c5d75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mert=20G=C3=B6r?= Date: Sun, 25 Jun 2023 16:12:07 +0300 Subject: [PATCH] class other 4 --- python-temel/class.sample.other.4.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 python-temel/class.sample.other.4.py diff --git a/python-temel/class.sample.other.4.py b/python-temel/class.sample.other.4.py new file mode 100644 index 0000000..ae5389e --- /dev/null +++ b/python-temel/class.sample.other.4.py @@ -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