该脚本实现了,登录,注册,修改密码功能。
#!/usr/bin/env python # -*- coding:utf-8 -*- #pangguoping import os def login(username,password): f = open("db",'r') for line in f: #print(line,type(line)) line_list = line.strip().split("|") #print(line_list,type(line_list)) if line_list[0] == username and line_list[1] == password: return True return False def register(username,password): f = open("db",