I just started With OOP and i am confused with this code-
class cartesianPoint:
pass
cp1 = cartesianPoint()
cp1.x = 1.0
cp1.y = 2.0
cp1
>
<__main__.cartesianPoint instance at 0x0000000001E7EB88>
Firstly Why I am able to add new variables to object which do not belong to the Class?If class is a blueprint for objects,shouldnt the objects follow the buleprint ? And even though python allows you to do so, why does the object still belong to the same class?