Technically, yes, you have to repeat the iteration twice. By definition, with the exception of a narrow band of possible operations, this will be slower than repeating once. You should also select iterator objects twice, not once, etc. Etc. If you are dealing with a massive list, I suggest that two loops can cause more paging memory.
? , .
: (, ), , . , , , , , , -, . , , - ( ), , .