You removed (see a note below) the new-line ending from the line from csv file (line 13), and then on line 30 you add new-line '\n' to user input on line 30. So they cannot be equal.
Now for the line 13 - it's not a problem in this particular case, but you replace '\n' with '', but depending on OS and the way you open the file, the new line may differ, e.g. '\r\n' vs '\n' vs '\r'. better use
Now for the line 13 - it's not a problem in this particular case, but you replace '\n' with '', but depending on OS and the way you open the file, the new line may differ, e.g. '\r\n' vs '\n' vs '\r'. better use
line = line.strip()
or line = line.rstrip()
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs