0
How I transform my output in one line (in python )
In code I used- for...in.. : After that I did some operation Then I get output as follows Asd Fgh Jkl But I want output like - Asd Fgh Jkl Please help me to fix this problem
2 ответов
+ 2
You can manipulate the 'end' parameter of the print function.
Default is '\n' (newline), but you can change it to a single space.
for number in 1, 2, 3:
print(number, end=' ')