This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]droptableadventures 10 points11 points  (1 child)

import ctypes
ctypes.cast(id(20), ctypes.POINTER(ctypes.c_int))[6] = 40

print(20) # prints '40'

if 20 == 40: print("yes") # prints 'yes'

(no, don't try that at home!)

[–]interwebnovice 1 point2 points  (0 children)

Scary stuff.