0

Help

words = ["hello", "world", "spam", "eggs"] for word in words: print ("word"+ "!") here can i write. for numbers in words. if not why...

20th Apr 2017, 6:10 PM
stephen haokip
stephen haokip - avatar
1 Answer
+ 4
Of course you can. word is just an iterating variable, you can name it anything you like. Good practice to name it by singular form of the iterable's name, just for better readability. But can as well be i, a or sjfj_rjrj45.
20th Apr 2017, 9:11 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar