class other 3

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

View File

@ -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