When I run the code and then check the variable id using the cheat engine, they are different, why?
Here's what i have:
import time
x = 500
while True:
time.sleep(1)
print(f'ID: 0x{format(id(x), "X")}\nValue: {x}')
The "cheat engine" is showing you the location of the data itself. The id
is the address of the integer object. Each object (even integers) has structure overhead.