So here is two parts of pygame python code:
a = self.img.get_rect(topleft = (self.x, self.y))
print(a.topleft)
The output of this code is :
(200, 189)
Another pygame code:
a = self.img.get_rect(topleft = (self.x, self.y)).center
print(a)
The output of this code:
(234, 213)
Note: The value of self.x is 200 and self.y is 200
So now my question is how after we put .center after the pygame rect object or the variable a
when i print the value of a it changes and what does a .center after a pygame rect object do?