The problem has been solved opening the file for iteration in the second loop. I didn't realized such Python behavior. Any comments are appreciated. Fred -- View this message in context: http://python.6.n6.nabble.com/SOLVED-for-loop-weird-behavior-tp4953214p4957597.html Sent from the Python - python-list mailing list archive at Nabble.com.