📜  制作一个适用于每个偶数的循环 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:24.888000             🧑  作者: Mango

代码示例1
num_page_items = len(odds)
for i in range(num_page_items):
    if i % 2 == 0:                    #This is a sanity check to see if i is odd or even
        Home = odds[i].text
    else:
        Away = odds[i].text