python - Make a loop go back to the begining of a list -
i’m making cross reference program in python. have list of 600 data points, , of 148 data points. want cross reference 2 find similar points within specific range. know have loop through 1 list, find range met, loop stop when finished list. how make go top of list once has reached end?
for idx in hectora: matches = np.where(abs(hectora[idx] - ra) < .01) print idx
hectora
list 600 points; ra
list 148 points. want able loop through either one.
using for
statement on list start beginning of list each time start loop.
hence, every
for item in mylist: # item.
will loop on mylist beginning.
Comments
Post a Comment