The lines that you read from skeleton
have new lines at the end, so the exact string comparison are probably not going to work. If you do line = line.strip()
as the first line of your loop it will remove whitespace from before and after any text on the line, and might get you closer to what you want.