Here is some of my code:
username1 = input ("Please enter your username")
file = open ("login.txt","r")
for loop in range(2):
line = file.readline()
data = line.split (",")
if data[1] == username1:
print("Your username is correct, please enter your password")
It doesn't do the if statement after i use the correct username which can be found in the file i have attached below.
Any feedback would be greatly appreciated
-Aiden
username1 = input ("Please enter your username")
file = open ("login.txt","r")
for loop in range(2):
line = file.readline()
data = line.split (",")
if data[1] == username1:
print("Your username is correct, please enter your password")
It doesn't do the if statement after i use the correct username which can be found in the file i have attached below.
Any feedback would be greatly appreciated
-Aiden