python怎么合并两个列表的内容
1个回答
展开全部
~$ python
Python 2.7.3 (default, Mar 14 2014, 11:57:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a = [1, 2, 5, 8 ,12,6,1]
>>> b = [25, 13, 6, 9,3,2]
>>> a + b
[1, 2, 5, 8, 12, 6,1,25, 13, 6, 9,3,2]
>>>
Python 2.7.3 (default, Mar 14 2014, 11:57:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a = [1, 2, 5, 8 ,12,6,1]
>>> b = [25, 13, 6, 9,3,2]
>>> a + b
[1, 2, 5, 8, 12, 6,1,25, 13, 6, 9,3,2]
>>>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询