python loop two
for f, b in zip(foo, bar):
print(f, b)
python loop two
for f, b in zip(foo, bar):
print(f, b)
loop through 2 items python
#----------- For loop using 2 items of a list --------------- #
mylist = [117, 202, 287, 372, 457, 542]
#range() has a third parameter allowing you to specify step size, letting you loop through more than 1 item at a time
#range(start, end, stepsize)
for i in range(0, len(mylist), 3):
print(mylist[i])
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us