[Python] how to convert negative integer value to hex in python

Discussão em 'Python' iniciado por Stack, Julho 20, 2025.

  1. Stack

    Stack Membro Participativo

    I use python 2.6

    >>> hex(-199703103)
    '-0xbe73a3f'

    >>> hex(199703103)
    '0xbe73a3f'


    Positive and negative value are the same?

    When I use calc, the value is FFFFFFFFF418C5C1.

    Continue reading...

Compartilhe esta Página