for word in words: What is "word" in this example?
How can Python know what this variable means? We didn't assigned its value.
for the 1st iteration word=words for the 2nd iteration word=words and so on it's nothing but a temporary variable
In python, while using the for loop, it automatically creates the variable for you and assigns every element in the array to it. In this case, word is a random variable chosen. It could have been anything like, tuna, potato, apple, and still the result would have been the same.
it's arbitrary. they could have used any variable name to hold the current value of the list. Similar syntax is used in other scripting language such as bash.