I'm new to Python (I've only used C) and I've discovered new loops such as for/else... So I wonder if I'm ignoring a cleaner way to handle this loop:
flag = 0
for i in range (n):
if not flag and condition:
statement_1
flag = 1
if flag and condition:
statement_2
I need to keep the for counting, because I know that at least one element will satisfy the condition, so when I find it I'll do statement_1. Then if another element will satisfy the condition as well, I'll do statement_2.