¡@

Home 

python Programming Glossary: check_digit

Checking if an ISBN number is correct

http://stackoverflow.com/questions/4047511/checking-if-an-isbn-number-is-correct

if the ISBN number is valid. Here' my code def check isbn check_digit int isbn 1 match re.search r' d d 3 d 5 ' isbn 1 if match digits.. digits result i 1 int digit return True if result 11 check_digit else False return False I've used a regular expression to check.. bulk of code isn't nested. This gives us def check isbn check_digit int isbn 1 match re.search r' d d 3 d 5 ' isbn 1 if not match..