Pergunta de entrevista da empresa Canonical

Write a function in Python to check if an input string is a valid ISBN.