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

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Erhalten Sie die Größe in Bytes, die für eine Ganzzahl in Python benötigt werden

by Anonymous » 03 Jun 2025, 18:27

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

Top