-
-
Save crclz/8da1ff89b00575604eb3493e15abe76a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with open('a.bin', 'rb') as f: | |
while True: | |
for length in [4, 2, 4]: | |
data = f.read(length) | |
if len(data) == 0: | |
exit(0) | |
print(int.from_bytes(data, byteorder='little'), end=' ') | |
print() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
简单清晰。点赞。