더북(TheBook)
data = b"shave and a haircut, two bits"
view = memoryview(data)
chunk = view[12:19]
print(chunk)
print("크기: ", chunk.nbytes)
print("뷰데이터: ", chunk.tobytes())
print("기저 데이터:", chunk.obj)

 

>>>
<memory at 0x105407940>
크기:        7
뷰데이터:    b'haircut'
기저 데이터: b'shave and a haircut, two bits'