Smartbridge interview question

code in py for plaindrome