EXL Service interview question

Basic joins , and list comprehension and def function