Handwritten Digit Recognition Python Code