0

I wanted to read last 50 bytes from a file.

I've used the following code to read first 50 bytes.

def read_file(filepath):
    open_file = open(filepath)
    return "".join("{:02x}".format(int(ord(c))) for c in open_file.read(50))
jOSe
  • 687
  • 11
  • 22

0 Answers0