t317.py 208 B

12345678910111213
  1. class Point:
  2. def __init__(self, initX, initY):
  3. self.x = initX
  4. self.y = initY
  5. def __str__(self):
  6. return str(self.x) + "," + str(self.y)
  7. p = Point(1,2)
  8. print(p)
  9. print str(p)