2013-04-03 96 views

回答

6
>>> L = [['a', 'b'], ['c', 'd'], ['e', 'f'], ['g']] 
>>> [[''.join(x)] for x in L] 
[['ab'], ['cd'], ['ef'], ['g']] 
+0

哦真棒谢谢! – user2240542

-1

此外,您还可以使用地图它

>>> L = [['a', 'b'], ['c', 'd'], ['e', 'f'], ['g']] 
>>> map(lambda x: [''.join(x)], L) 
[['ab'], ['cd'], ['ef'], ['g']] 
相关问题