1list = [99, 98, 97, 96, 95, 94]
2
3for number in list:
4 if number == 2:
5 print("There is a 2 in the list")
6 break
7else:
8 print("There are no 2's in the list")
9
10# The else statement is only reached if the for loop
11# has run all the way through without breaking
1numbers = [2, 4, 6, 8, 1]
2for number in numbers:
3 if number % 2 == 1:
4 print(number)
5 break
6else:
7 print("No odd numbers")