Aloha Technology Interview Question

A program in python like number if digits