python range in one line code example
Example 1: one-line for loop python
[thing for thing in list_of_things]
Example 2: printing a range of no one line in python
for x in range(1,11):
print(x, end=" ")
[thing for thing in list_of_things]
for x in range(1,11):
print(x, end=" ")