How do i convert a list into a string in python?
I have tried using a for loop but i want a simpler method to join.
Input:
['I', 'want', 4, 'apples', 'and', 18, 'bananas']
Output:
I want 4 apples and 18 bananas
>Solution :
you can try using .join() method to convert the list into the string.
First you declare your List and then declare a empty string variable then use
.join() method to convert.