From a34941254835cc776d886ea1b28de76dd25d3ae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mert=20G=C3=B6r?= Date: Sun, 25 Jun 2023 16:08:11 +0300 Subject: [PATCH] class other 3 --- python-temel/class.sample.other.3.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 python-temel/class.sample.other.3.py diff --git a/python-temel/class.sample.other.3.py b/python-temel/class.sample.other.3.py new file mode 100644 index 0000000..b4f6fec --- /dev/null +++ b/python-temel/class.sample.other.3.py @@ -0,0 +1,8 @@ +class Sample: + x = 10 + def __init__(self, x): + self.x = x + +s = Sample(20) +print(s.x) # 20 +print(Sample.x) # 10