how to print for loop output in single line in python code example Example: python print for loop one line for i in range(1,11): print(i , end=" ")