import os import sys b = open(sys.argv[1], "rb").read() l_c = 0; for byte in b: print("{:08b}".format(byte), end="") l_c += 1 if l_c == 24: print("") l_c = 0