checkdigit.verhoeff.calculate¶
- checkdigit.verhoeff.calculate(data: str) str [source]¶
Calculates a Verhoeff check digit.
- Parameters:
data – A block of data without the check digit
- Returns:
A string representing the missing check digit
- Return type:
str
Examples
>>> from checkdigit import verhoeff >>> verhoeff.calculate('236') '3' >>> verhoeff.calculate('123456') '8' >>> verhoeff.calculate('1337') '5'