已关闭,该问题需要details or clarity,目前不接受回答。
**想要改进此问题?**通过editing this post添加详细信息并澄清问题。
12小时前关闭。
Improve this question
从这个编码练习中,他们从哪里得到i
?
def highest_even(li):
evens = []
for i in li:
if i % 2 == 0:
evens.append(i)
return max(evens)
print(highest_even([10,2,3,8,11]))
1条答案
按热度按时间oxosxuxt1#
在许多编程语言中,你可以在 for 循环语句中动态定义一个变量,这就是 i 的来源。