What is the smallest or fastest way to return the index of a list, where the number is ~2, starting from the index of A?
So
Code:
and
Code:
So
Code:
A=2, L1 = {~1,7,~2,1,~1,6,~2}
would return 3
Code:
A=5, L1 = {~1,7,~2,1,~1,6,~2}
would return 7