ISBN13 check digit: Difference between revisions
Content added Content deleted
Line 1,673: | Line 1,673: | ||
# isISBN13 :: String -> Bool |
# isISBN13 :: String -> Bool |
||
def isISBN13(s): |
def isISBN13(s): |
||
'''True if s is a valid ISBN13 string |
'''True if s is a valid ISBN13 string |
||
''' |
|||
digits = [int(c) for c in s if c.isdigit()] |
digits = [int(c) for c in s if c.isdigit()] |
||
return 13 == len(digits) and ( |
return 13 == len(digits) and ( |