python进阶练习之——列表排序、连接❤️

101 阅读1分钟
**题目:**列表排序及连接。
**程序分析:**排序可使用 sort() 方法,连接可以使用 + 号或 extend() 方法。
a=[2,6,8]
b=[7,0,4]
a.extend(b)
a.sort()
print(a)