To get the bytes back into the proper order I use extended slice notation on the bytearray with a step of -1: b[::-1] . def bitstring_to_bytes(s): v = int(s, 2) ...
確定! 回上一頁