milind upadhyay | 96016ca | 2021-02-20 15:28:50 -0800 | [diff] [blame] | 1 | #!/usr/bin/python3 |
2 | |||||
3 | class Rect: | ||||
4 | |||||
5 | # x1 and y1 are top left corner, x2 and y2 are bottom right | ||||
6 | def __init__(self, x1, y1, x2, y2): | ||||
7 | self.x1 = x1 | ||||
8 | self.y1 = y1 | ||||
9 | self.x2 = x2 | ||||
10 | self.y2 = y2 | ||||
11 | |||||
12 | def __str__(self): | ||||
13 | return "({}, {}), ({}, {})".format(self.x1, self.y1, self.x2, self.y2) |