Klick interview question

Regex validation using Python