I wrote it like that in case a student for some reason also has a variable named wordlengths in their project. If we are grading thousands of these assignments, one of them might have this happen. I'm open to suggestions.