0

words = ["hello", "world", "spam", "eggs"] for word in words: print(word + "!")

how the value of the variable word is incremented????

29th Nov 2017, 12:05 PM
Programmer
Programmer - avatar
3 Answers
0
its simple..the for loop is running from first element to last element in the list and the variable taken was word..we can take any variablename and printed in every iteration😊
29th Nov 2017, 12:12 PM
Sreekar Siddula
Sreekar Siddula - avatar
0
thanks
29th Nov 2017, 1:05 PM
Programmer
Programmer - avatar
0
👊anytime bro
29th Nov 2017, 1:06 PM
Sreekar Siddula
Sreekar Siddula - avatar