Hello
I would like to know how I compare a string entered by the user with the strings contained in a .txt file
My last attempt was like this, but I did not get the result I wanted:
f = open("Testando.txt","r")
r = f.readline()
nome = input ("Digite qualquer coisa : ")
for line in r :
if line == nome :
print("já existe um nome igual")
else :
print("Obrigado pela nova interação")
input("Pressione em qualquer tecla para sair do programa")
f.close()*
Thank you in advance for your attention. :)