Erhalten Sie die Größe in Bytes, die für eine Ganzzahl in Python benötigt werdenPython

Python-Programme
Anonymous
 Erhalten Sie die Größe in Bytes, die für eine Ganzzahl in Python benötigt werden

Post by Anonymous »

Wie kann ich herausfinden, wie viele Bytes eine bestimmte Ganzzahl -Nummer zum Speichern benötigt? < /p>
e.g. for

[*]hexadecimal \x00 - \xff (or decimal 0 - 255 = binary 0000 0000 - 1111 1111) I'm looking to get 1 (Byte),
[*]hexadecimal \x100 - \ xffff (oder Decimal 256 - 65535 = binär 0000 0001 0000 0000 - 1111 1111 1111

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post