Implementing Checksum Using Python Dictionaries