lst1 = [1,2,3,4,5,"hello",6,7,8,9,]
countodd = 0
counteven = 0
for i in range(len(lst1)):
if i%2 != 0:
countodd += 1
else:
counteven += 1
else:
type(lst1) == str:
break
print("this is string!!")
print("this counter of even numbers:",counteven)
print("this counter of odd numbers:",countodd)
Create a python program that will count the number of appearances of odd and even values in a list. In case that the program encounters a string use break statement and return a print that says, “It’s a string!!!” and nullify the values of odd and even numbers counters.