class Point: __slots__ = ('x', 'y') def __init__(self, x, y): self.x = x self.y = y p = Point(3, 4) print(f'x: {p.x}') print(f'y: {p.y}')
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter