Infosys Interview Question

how to make a for loop in python in one line.