Created
November 27, 2019 02:27
-
-
Save HilmiZul/6c0da0297d913e3176a1deefef7174f6 to your computer and use it in GitHub Desktop.
Login with text as database
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def login(user, password): | |
| with open("user.txt") as f: | |
| isi = f.readlines() | |
| isi = [x.strip() for x in isi] | |
| if user == isi[0] and password == isi[1]: | |
| print("Login Berhasil") | |
| else: | |
| print("User dan Password tidak cocok!") | |
| user = input('user: ') | |
| password = input('password: ') | |
| login(user, password) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment