0

How to print out Save me in one line if list = ('S' , 'a' , 'v' , 'e' , 'm' , 'e')

If I use for then all letter get print in different lines.

14th Dec 2020, 7:24 PM
Mind Blown
Mind Blown - avatar
2 odpowiedzi
+ 4
list = ['s', 'a', 'v', 'e', ' ', 'm', 'e'] char = '' print(char.join(list)) #returns 'save me'
14th Dec 2020, 7:33 PM
Ayan Fox
Ayan Fox - avatar
+ 2
lst = ('S' , 'a' , 'v' , 'e' , 'm' , 'e') print(*lst, sep="") print("".join((lst)))
14th Dec 2020, 7:33 PM
rodwynnejones
rodwynnejones - avatar