total = 0 with open("/dev/zero") as f: for _ in xrange(1000): chunk = f.read(64 * 1024) if chunk == "": break for byte in chunk: total += ord(byte) total = total % 256 print(total)