Open this example in the interactive library
Source code
point = (3, 4)
x, y = point
print(x * x + y * y)Sample output
25

Use immutable coordinates. A self-contained example using the Python standard library.
Open this example in the interactive library
point = (3, 4)
x, y = point
print(x * x + y * y)25