Let's say I have a list of words like:
words = ['word1', 'word2', 'word3', 'word4', 'word5', 'word6', 'word7', 'word8']
How do I iterate over it to pull groups of 5 and assign them to a variable as strings which I then run some code and then change the variable so that my output looks something like this:
var = 'word1', 'word2', 'word3', 'word4', 'word5'
print(var)
var = 'word6', 'word7', 'word8'
print(var)