Pregunta de entrevista de Moovit

Write a function in python that check if a given user ID is written as defined.