+ 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 Answers
+ 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
Okay and whats wrong here 😅 https://code.sololearn.com/cnivc04na8TH/?ref=app
18th Aug 2017, 8:47 PM
Ninj4
0
okay 😊
19th Aug 2017, 7:27 AM
Ninj4