Relative Content

Tag Archive for pythonlistfor-loop

list.index error – variable does not reset

I’m writing code that receives as input song lyrics as a .txt file with periods separating the different parts and am having trouble creating a for loop in python that does the separation properly. For some reason it the index always goes back to the first separating line.