[Tutor] how to transform the data as below?

Alan Gauld alan.gauld at btinternet.com
Fri Mar 18 14:51:24 EDT 2016


On 18/03/16 15:31, Peter Otten wrote:

> I suppose he thinks that hexadecimal and binary is the same. The data you 
> showed is binary. For example the following sequence of bytes
> 
> 9 1 120 1 253 2
> 
> is displayed as the bytestring
> 
> b'\t\x01x\x01\xfd'

What happened to the 2 at the end?
Shouldn't it be:

b'\t\x01x\x01\xfd\x02'


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list