I am learning Python3 and while doing some revision i wrote out a simple 'for loop' and noticed that when i wanted the output on an
horizontal level it outputted the string and the python prompt on the same line.
Here is a sample of Python code i used:
I have tried using the print() function like print(program, end='\n')
But this results in the output being printed on a vertical line.
Hope someone can help a noob like myself.
Thanks all
horizontal level it outputted the string and the python prompt on the same line.
Here is a sample of Python code i used:
Code:
>>> programming = 'python.code'
>>> for program in programming :
... print(program)
...
python.code>>>
I have tried using the print() function like print(program, end='\n')
But this results in the output being printed on a vertical line.
Hope someone can help a noob like myself.
Thanks all