Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I want to write something like:
str="0xdeadbeef"
so that in the memory, where str is stored, the binary represntation will be "deadbeef".
How can I do that?
instead of writing str="ABCD" I want to write something like str="0x41424344"
str="ABCD"
str="0x41424344"
It sounds like you're looking for
s = '\xde\xad\xbe\xef'
but why?