list_test =[1,2,3,4,5] for i in range(0,len(list_test)): print(i)
结果是 1 2 3 4 5
注意
for i in range 是前闭后开的。
posted on 2019-05-08 11:21 dairui130 阅读(296) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 dairui130 Powered by .NET 9.0 on Kubernetes