So let's say I have a list
answer_list = aaAbaBabBaBBaAbBAb
What am trying to do is something like this
dimension_1_index = 0
dimension_1_b_answers = 0
while dimension_1_index <= len(answer_list):
if answer_list[dimension_1_index] == "b" or "B":
dimension_1_b_answers += 1
dimension_1_index += 7
else:
continue
print(dimension_1_b_answers)
so I'm trying to check for every 7 characters, if the character is either a lowercase or uppercase B, I increment dimension_1_b_answers
. But when I run the program, I get no result.