+ 2
Plz explain line number five (how counter is related to words )why in square brackets here , wht is the logic here ..?
words = ["hello", "world", "spam", "eggs"] counter = 0 max_index = len(words) - 1 while counter <= max_index: word = words[counter] print(word + "!") counter = counter + 1
1 Antwort