input: Write a function to validate an ISBN-10 number.
  assert isValidISBN('0306406152') == True
  assert isValidISBN('123456789X') == False
  assert isValidISBN('048665088X') == True
  assert isValidISBN('1234567890') == False
output: def isValidISBN(isbn):
      if len(isbn) != 10:
          return False
      total = 0
      for i in range(9):
          if not isbn[i].isdigit():
              return False
          total += int(isbn[i]) * (10 - i)
      if isbn[9] == 'X':
          total += 10
      elif isbn[9].isdigit():
          total += int(isbn[9])
      else:
          return False
      return total % 11 == 0