this is one of the looping techniques available in python. If you have iterable, like list, dict, string, etc. (i.e. any iterable) you can iterate over elements of the iterable using for loop. in this case
check this tutorial https://python-forum.io/Thread-Basic-Nev...n-sequence and especially the article linked at the end - https://nedbatchelder.com/text/iter.html
EDIT (02 April 2018) - Ned Batchelder's post/presentation is python2. For changes in dict iteration introduced with python3, please check PEP 469 -- Migration of dict iteration code to Python 3
tweet_txt
is just a name (i.e. variable) that takes the value of each of the elements in the list. as you discovered, you can use sentence
to the same effect. The important is to use descriptive names when you code.check this tutorial https://python-forum.io/Thread-Basic-Nev...n-sequence and especially the article linked at the end - https://nedbatchelder.com/text/iter.html
EDIT (02 April 2018) - Ned Batchelder's post/presentation is python2. For changes in dict iteration introduced with python3, please check PEP 469 -- Migration of dict iteration code to Python 3