Fastest way to convert a list of strings into a single concatenated string?

后端 未结 7 2053
一向
一向 2021-02-14 21:27

I have some LINQ code that generates a list of strings, like this:

var data = from a in someOtherList
           orderby a
           select FunctionThatReturnsS         


        
7条回答
  •  梦毁少年i
    2021-02-14 22:19

    Alternative:

    >>> data = ['Some ', 'resulting ', 'data here.']
    >>> s = ''.join(data)
    >>> s
    'Some resulting data here.'
    

提交回复
热议问题