For example, I have a variable called a
, and need to change it by its memory address:
a: str = "hello"
address: int = id(a)
change_by_address(address, a, 'newval') # is something like this possible?
Is there some way to do this, perhaps in the ctypes
library?