lst=[i*4 for i in range(1,11)] print(lst) # i*4 为元素根据i规律的表达式
E:\PycharmProjects\pythonProject\venv\Scripts\python.exe E:/PycharmProjects/pythonProject/demon1/demo4.py [4, 8, 12, 16, 20, 24, 28, 32, 36, 40] 进程已结束,退出代码0
Powered by: 博客园 Copyright © 2024 蓝绝 Powered by .NET 9.0 on Kubernetes