+ 1

Switch a list in a String

How I can switch a list in a String. I can split a String in a list with split but how I can switch a list in a String in Python?

18th Aug 2017, 6:50 PM
Ninj4
8 ответов
+ 4
"".join(['1', '2', '3']) # because you can always join() what you have split()
18th Aug 2017, 6:57 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
18th Aug 2017, 8:25 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 4
@Ninj4 Nothing, the code works alright. If you want to join the words without a space, just remove it ("" instead of " ").
19th Aug 2017, 7:17 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
0
Okay thank You 😄
18th Aug 2017, 7:02 PM
Ninj4
0
Hmm I try it but the Console printed that the object still is a list 🤔
18th Aug 2017, 8:07 PM
Ninj4
0
Okay thx
18th Aug 2017, 8:37 PM
Ninj4
0
18th Aug 2017, 8:47 PM
Ninj4
0
okay 😊
19th Aug 2017, 7:27 AM
Ninj4