I am trying to make a simple login (pretty much a DB) in python, the register works fine, it grabs the user and password, turns it into the user:pass format, and shoves it in the combolist.txt.
But when i try and login with the said user:pass, it fails.
You forgot to add
+ \n to the end of line 12. The reason it doesn't work is because line 12 is testing for a string and can't find it because the actual string has
\n on the end (which was added in line 28).
The correct code on line 12 is
combo = user + ':' + passw + '\n'
However, I do want to add a way to stop people from using the same username as another person.
I tried to do "if wanted_user in combolist:
print("username is taken!")"
but that doesn't seem to work.