if __name__ == '__main__':
for i, j in zip(range(5), range(7, 9)):
print(i, j)
for i, j in zip(range(5), range(7, 12)):
print(i, j)
zip可以实现两个变量配对同时循环,换句话说循环两个变量但是是配对的,如果配不成对就不循环
if __name__ == '__main__':
for i, j in zip(range(5), range(7, 9)):
print(i, j)
for i, j in zip(range(5), range(7, 12)):
print(i, j)
zip可以实现两个变量配对同时循环,换句话说循环两个变量但是是配对的,如果配不成对就不循环