标签:number 位置 clist 列表 com fun cti ash func
方法1: 直接使用"+"号合并列表
aList
=
[
1
,
2
,
3
]
bList
=
[
‘www‘
,
‘pythontab.com‘
]
cList
=
aList
+
bList
[1, 2, 3,
‘www‘
,
‘pythontab.com‘
]
aList
=
[
1
,
2
,
3
]
bList
=
[
‘www‘
,
‘pythontab.com‘
]
aList.extend(bList)
[1, 2, 3,
‘www‘
,
‘pythontab.com‘
]
aList
=
[
1
,
2
,
3
]
bList
=
[
‘www‘
,
‘pythontab.com‘
]
aList[
len
(aList):
len
(aList)]
=
bList
[1, 2, 3,
‘www‘
,
‘pythontab.com‘
]
aList
=
[
1
,
2
,
3
]
bList
=
[
‘www‘
,
‘pythontab.com‘
]
aList.append(bList)
[1, 2, 3, [
‘www‘
,
‘pythontab.com‘
]]
标签:number 位置 clist 列表 com fun cti ash func
原文地址:https://www.cnblogs.com/yanhuaqiang/p/10990142.html