List of integers

KP kai.peters at gmail.com
Sun Dec 13 19:24:53 EST 2015



data = list(f.read(4))
print data

from a binary file might give

['\x10', '\x20', '\x12', '\x01']


How can I receive this instead?

[0x10, 0x20, 0x12, 0x01]

Thanks for all help!




More information about the Python-list mailing list