Fractal interview question

Questions on python coding and asked to write a code which is on lists