I just learned to write python language, how do I want to do the wrap-line output?
I've done googling and the results aren't there, or don't know the keywords
The code is like this :
import binascii
filename = 'file.pdf'
with open(filename, 'rb') as f:
content = f.read()
print(binascii.hexlify(content))
The result will be like this, just single line :
255044462d312e340a25c3a4c3bcc3b6c39f0a322
But I want to make it like this, for example wrapped after 10 characters :
0x25, 0x50, 0x44, ...
Can anyone help me? Thanks!