I am trying to create a for loop or list comprehension that can go through a range, extract a single value each time by moving through each index in order, store it and then compare it to another value. for example:
def home():
for i in range (1,10):
###not sure how to extract one by one
### take that single value that was extracted from the range above and
reduce it from a index of type int
t_1 = (board[0] - i )
### call upon a function and plug in result:
reducer(t_1)
if reducer is True:
print ('hello world')
if reducer is False:
home()
so basically the function home() runs in loops until it finds the correct number in the range, plugs it in as a parameter to the function reducer(t_1) and returns the result. The issue is I cannot understand how to create that first for loop or list comprehension to extract that single value one at a time from the required range, store it and then valuate it.
Thanks for the help