Python数学建模 例题2.4
a = [[1,2,3], [4,5,6], [7,8,9]]
d = [c for b in a for c in b]
print(d)
结果:
D:\py\python.exe "D:\新建文件夹\python编译器\python 代码\ Python数学建模\数学建模例题\例题2.4.py"
[1, 2, 3, 4, 5, 6, 7, 8, 9]
进程已结束,退出代码为 0
2023310143026
a = [[1,2,3], [4,5,6], [7,8,9]]
d = [c for b in a for c in b]
print(d)
结果:
D:\py\python.exe "D:\新建文件夹\python编译器\python 代码\ Python数学建模\数学建模例题\例题2.4.py"
[1, 2, 3, 4, 5, 6, 7, 8, 9]
进程已结束,退出代码为 0
2023310143026