Read specific bytes of file in python

后端 未结 3 1538
一整个雨季
一整个雨季 2021-02-08 09:02

I want to specify an offset and then read the bytes of a file like

offset = 5
read(5) 

and then read the next 6-10 etc. I read about seek but

3条回答
  •  再見小時候
    2021-02-08 09:22

    seek doesn't return anything useful. It simply moves the internal file pointer to the given offset. The next read will start reading from that pointer onwards.

提交回复
热议问题