class Point def __init__ self self set def set self self self def get

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
class Point:
def __init__(self, x=0, y=0):
self.set(x, y)
def set(self, x=0, y=0):
self.x = x
self.y = y
def get(self):
return (self.x, self.y)
q = Point(15, 20)
x, y = q.get()
q.set(x - 5, y)