Why isn't my code finding the usernames or passwords in the file? How do you search through an excel file in python to find a stored value?
for line in read:
details = line.split(",")
if details[index] == username:
print("correct username")
current = index
if password == details[current + 1]:
print("correct password")
found = "true"
...
show more
for line in read:
details = line.split(",")
if details[index] == username:
print("correct username")
current = index
if password == details[current + 1]:
print("correct password")
found = "true"
if found == "false":
print("password and unsername doesn't match")
index = index + 1
login ()
details = line.split(",")
if details[index] == username:
print("correct username")
current = index
if password == details[current + 1]:
print("correct password")
found = "true"
if found == "false":
print("password and unsername doesn't match")
index = index + 1
login ()
Follow
3 answers
3
Are you sure that you want to delete this answer?