Python Struct Struct class in Python Example: from python_struct import * Point2D = Struct("Point2D", "x y") p2d = Point2D(x=8, y=12) print(p2d.x, p2d.y) This code will return: 8 12