What did the index do in this print statement

Hello. I am having some trouble understanding the while loops example.

dog_breeds = ['bulldog', 'dalmation', 'shihtzu', 'poodle', 'collie']

index = 0
while index < len(dog_breeds):
  **print(dog_breeds[index])**
  index += 1


And for index = index + 1. I know it makes it so the loops eventually ends but how? Every time it iterates through the list it will equal 1?

Did the course material cover the +=? This is not the same as re-assigning the value of index to 1, but rather incrementing it by 1.

Ok I see. So while its going through the list…bulldog = 1 then dalmation = 2 and so on? How does this make sure the program eventually terminates.

Edit: So while the index is less than 5(the length of the list) then it will keep going through the list until it reaches five?

Print occurs before any increments so it’d be indexing 0 the fist time around rather than 1. As for the while statement it first check if the expression is True, in this case- expression index < len(dog_breeds). If it is it proceeds to execute the statements grouped by that code block. Once all of those statements have been completed the it effectively jumps back to the the start of the loop and checks if the expression is True, if yes- start execute that code block but if not ignore the grouped statements and continue in the outer code block.