This is 100% a dumb question but I couldn’t find the answer. Would i be able to do a for loop between two different intervals?
Take for example:
array = [1,2,3,4,5,6,7,8,9,10]
for i in range(0,5) and range(7,9):
print(array[i])
and it would output:
1,2,3,4,5,8,9
>Solution :
You can use itertools.chain(range(0,5), range(7,9))