I am on the while loops section and I must say I am very confused by the lesson text. I don’t understand those two lines from the lesson text’s code about index. The exercise itself doesn’t end up using the index lines. The intro:
dog_breeds = ['bulldog', 'dalmation', 'shihtzu', 'poodle', 'collie'] index = 0 # ? why is this here ??? while index < len(dog_breeds): print(dog_breeds[index]) index += 1 # I think I know what this does,I think, but there is no explanation.
I was confused and thought we needed to use something like this in the code. The solution makes total sense, but I still don’t understand the lesson instructions themselves. Could you help me? Many thanks in advance!!!