Implementing Checksum Using Python