Python3 type bytes



  • In the second python, you can write a line of the species.

    s ="\x31\xc9\xf7\xe1\x64\x8b\x41\x30\x8b\x40"\
    "\x0c\x8b\x70\x14\xad\x96\xad\x8b\x58\x10"\
    

    and it'll work. How can you do a similar multi-start line for the White array? I mean, for

    s = b'\x31\xc9\xf7\xe1\x64\x8b\x41\x30\x8b\x40'..
    

    If I write two lines in a row, it doesn't work. If you ask through '' triple skirts, the row of the bayte will be marked with the portability of the row. It's only one line, but it's a very tight editor. ♪



  • The rules are the same as the lines:

    • Use it. \to screen the line in the code
    • Or you'll call in round brackets.

    Example:

    b = b'\xd0\xbf\xd1\x80\xd0\xb8\xd0\xb2\xd0\xb5\xd1\x82' \
        b' \xd0\xbc\xd0\xb8\xd1\x80!'
    print(b.decode('utf-8'))
    # привет мир!
    

    b = (b'\xd0\xbf\xd1\x80\xd0\xb8\xd0\xb2\xd0\xb5\xd1\x82'
    b' \xd0\xbc\xd0\xb8\xd1\x80!')
    print(b.decode('utf-8'))

    привет мир!



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2