how to write for loop in one line in python without a variable code example Example: making lists with loops in one line python print([i for i in range(10)])