Inner While Loop only run once
问题 The purpose of the code is to find a portion of a string (from one document) in a long list of strings (another document), and return the results to a list. I have two while loops, one nested in the other. The outer loop reads each line of that document, and the inner reads each loop of its document. For some reason, the inner while only runs once (for the outer loop's first iteration). Can you explain why and how I could fix it? It seems like it only reads all the lines once and then doesn't