How to convert list value to string? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to convert list value to string?

I used the list function on a str and got the return value in the form of one char per index. I used the del function on myList[-1] till I get myList[-1] as '='. Now I want to convert this list to a string. How can I do that ? I am using Python3

21st Jul 2017, 9:26 AM
Vincent D'souza
Vincent D'souza - avatar
2 Answers
+ 1
myList=["a","b","c"] myString="" print(myString.join(myList))
21st Jul 2017, 10:58 AM
LordHill
LordHill - avatar
+ 2
Thnx Joker
21st Jul 2017, 2:48 PM
Vincent D'souza
Vincent D'souza - avatar