Fractal Interview Question

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