【发布时间】:2011-06-18 16:53:25
【问题描述】:
可能重复:
how can i get around declaring an unused variable in a for loop
在 Python 中,尤其是使用 for 循环时,如果您不关心变量,有没有办法不创建变量,即本例中不需要的 i:
for i in range(10):
print('Hello')
【问题讨论】:
-
你说得很好!搜索是一件令人沮丧的事情。