-4

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?

4

1 回答 1

2

instead of writing str="ABCD" I want to write something like str="0x41424344"

It sounds like you're looking for

s = '\xde\xad\xbe\xef'

but why?

于 2013-03-30T08:28:50.140 回答