Contact: aviboots(AT)netvision.net.il
39,895 questions
51,826 answers
573 users
hex = 'питон - python'.encode('utf-8') print(hex) ''' run: b'\xd0\xbf\xd0\xb8\xd1\x82\xd0\xbe\xd0\xbd - python' '''
hex = b'\xab\xcd\xef'.hex() print(hex) ''' run: abcdef '''
import binascii b = 'питон - python'.encode('utf-8') hex = binascii.hexlify(b).decode('utf-8') print(hex) ''' run: d0bfd0b8d182d0bed0bd202d20707974686f6e '''