Edit:
The updated question has a simple answer, no. Arbitrary iterators have no idea if they are on their last item, so there is no way for the for loop to know.
That said, the value in a loop isn't constrained to the loop, so x directly after the end of the loop will always be the last value.
If you wish to continue looping, you can simply set a flag:
found = False
for x in some_list:
if x.value == value:
print('Found')
found = True
if not found:
print("Not Found.")
If you didn't want to do something on each step of the loop, you can use any() and a generator expression to find out there are no matches easily:
if not any(x.value == value for x in some_list):
print("Not Found.")
forloop' mean? Is it that you don't have an option tobreakbecause there's more than one matching item possible?xat the end of the loop will always be the last value.