I am trying to read MNIST data without API. I have seen the format from http://yann.lecun.com/exdb/mnist/. For the training set label file, the bytes from 4 to 7 should indicate the number of samples i.e., 60000.
train = open('train-labels-idx1-ubyte','rb')
train.read(4)
bytecode = train.read(4) // this gives the bytecode.
I want to convert that to int, I am new here, can I get some help?