摘要: x = 53523566 # 数字转为字节字符串 nbytes, rem = divmod(x.bit_length(), 8) if rem: nbytes += 1 print(nbytes) print(x.to_bytes(nbytes, 'little')) # 字节字符串转为数字 dat 阅读全文
posted @ 2020-12-18 23:19 公众号python学习开发 阅读(263) 评论(0) 推荐(0) 编辑