Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
8-bit integer to bytes
#2
(1024).to_bytes(3, 'big')
https://docs.python.org/3/library/stdtypes.html#int.to_bytes
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
8-bit integer to bytes - by Garitron - Sep-14-2019, 10:45 PM
RE: 8-bit integer to bytes - by ichabod801 - Sep-14-2019, 11:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to convert 4 bytes to an integer ? GiggsB 11 7,053 Jan-20-2022, 03:37 AM
Last Post: GiggsB
  Pack integer values as single bytes in a struct bhdschmidt 3 2,386 Jun-09-2020, 09:23 PM
Last Post: bhdschmidt
  replace bytes with other byte or bytes BigOldArt 1 10,712 Feb-02-2019, 11:00 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020