items=list(range(10)) checks=0 for value in items: checks+=1 if value==9:break print(checks)