From python 3.2 you can do >>> (1024).to_bytes(2, byteorder='big') b'\x04\x00' https://docs.python.org/3/library/stdtypes.html#int.to_bytes def ...
確定! 回上一頁