ARTICLE DETAIL

建站实战干货

来自一线的建站与推广经验沉淀,每一条都经过真实交付验证。

[学点编程]python workout,每天10分钟学会python 读书笔记

2026/8/18 13:09:14 拓冰建站 浏览量
[学点编程]python workout,每天10分钟学会python 读书笔记

python workourt第一章

预备知识

enumberate

scores = [75, 88, 92, 67, 95, 83, 79]
index = 0
for score in scores:if score >85:print(score)print(index)index = index + 1

  

scores = [75, 88, 92, 67, 95, 83, 79]
print("高分榜:")
for index, score in enumerate(scores):if score >80:print(f'第{index+1}个学生的成绩是{score}')