TGViewer
Python | Тесты для программистов Python | Тесты для программистов @pythontest_it · 15K subscribers
Post #9315 100
class A:
def __init__(self):
self.__x = 1

def get_x(self):
return self.__x

class B(A):
def __init__(self):
super().__init__()
self.__x = 2

b = B()
print(b.get_x())


💕 Наш уютный чатик

#Python
More from @pythontest_it
  1. Sep 21, 2026Post #9316
  2. Sep 21, 2026Post #9314
  3. Sep 21, 2026print(1 in [1, 2] == True) 💕 Наш уютный чатик #Python
  4. Sep 20, 2026Post #9312
  5. Sep 20, 2026def modify(n): n = n + 5 n *= 2 return n x = 10 result = modify(x) + x print(result) 💕 На…
  6. Sep 20, 2026Post #9310
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →