Hexadecimals in python

Posted by ryudice on Stack Overflow See other posts from Stack Overflow or by ryudice
Published on 2010-03-07T23:33:06Z Indexed on 2010/03/08 0:17 UTC
Read the original article Hit count: 405

Filed under:

I don't know python and I'm porting a library to C#, I've encountered the following lines of code that is used in some I/O operation but I'm not sure what it is, my guess is that it's a hexadecimal but I don't know why it's inside a string, neither what the backslashes do?

    sep1 = '\x04H\xfe\x13' # record separator
    sep2 = '\x00\xdd\x01\x0fT\x02\x00\x00\x01'  # record separator

© Stack Overflow or respective owner

Related posts about python