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

25th May 2020, 9:04 PM
Akash Babasaheb Chavan
Akash Babasaheb Chavan - avatar
2 Réponses
+ 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=' ')
25th May 2020, 9:11 PM
HonFu
HonFu - avatar