0 votes
in Python Flask by
How will you convert a list into a string?

1 Answer

0 votes
by
We will use the join() method for this.

>>> nums=['one','two','three','four','five','six','seven']

>>> s=' '.join(nums)

>>> s

‘one two three four five six seven’
...