However, it likely will not be the target immediately. Thus, we apply this logic: if the sum of the values is less than the target value, we increment the left pointer (move your left pointer pointer_one one index rightwards).
And if the sum is higher than the target value, we decrement the right pointer (correct the position of your pointer pointer_two if necessary).
1elif sum < target:
2 pointer_one += 1
3else:
4 pointer_two -= 1