Apr-28-2024, 09:07 AM
(This post was last modified: Apr-28-2024, 09:07 AM by Gribouillis.)
You could try this (perhaps not the most efficient)
>>> bytes([int('00001111', 2)]) b'\x0f' >>> int('00001111', 2).to_bytes(1, 'little') b'\x0f'
« We can solve any problem by introducing an extra level of indirection »