A while loop in my code is not looping.
I've tried ensuring the while loop would loop but no loop was executed.
#Name_Input
login = 1
while login == 1:
print("Enter the username and password \n")
username = input("Username: ")
password = input("Password: ")
if password and username != "cameron" and "123":
print("\nWrong username or password... \nTry Again...")
login = 1
I am expecting the loop to go back to the login when the login details are entered incorrectly.
ifdoesn't work as you expect. You need to do something likeif condition_1 or condition_21is a boolean value. Actually all objects in Python have a boolean value, thebooltype was a later (and highly debated FWIW) addition.