Persistent Systems interview question

write python list based like frequency type