0
what is the use of word=words[counter]
2 Answers
0
words[] is an array of strings such as
[apple, pineapple, tomato]
when you talk about words[counter] the object you refer is a string such as
words[0] = apple
words[1] = pineapple
so on
>>word = words[2]
>>print word
tomato
0
counter just gives out the index of the word it just counted. In above example counter of 'apple' is 0. Thus word[counter] is same as word[0]