1.代码
代码如下:
lA = [1, 7, 9, 11, 13, 15, 17, 19]
lB = [2, 4, 6, 8, 10]
lC = lA + lB #集合的加法
lC.sort() #对lc进行升序排列.sort方法
print(lC)
2.运行结果
D:\Python代码\Scripts\python.exe C:/Users/Lenovo/PycharmProjects/pythonFirstStart/实验/demo11.py
[1, 2, 4, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19]
Process finished with exit code 0