Aloha Technology interview question

A program in python like number if digits