我找不到任何(对于初学者)可读的信息。是否有可能对最后一个项目的事件在for循环中:Python for循环中最后一项的事件处理程序
array = ["foo", "bar", "john", "test"]
for item in array:
print item
LastItemEvent: forLoop + lastItem
def lastItem:
# call another function
doneWithLoop()
还是需要有一个递增的整数计算等?可怕的例子,但我希望你们明白。
你是说你想在循环之前调用最后一个项目上的事件吗? – jamylak