RosettaCodeData/Task/CRC-32/Python/crc-32-1.py

9 lines
167 B
Python

>>> s = 'The quick brown fox jumps over the lazy dog'
>>> import zlib
>>> hex(zlib.crc32(s))
'0x414fa339'
>>> import binascii
>>> hex(binascii.crc32(s))
'0x414fa339'