Discuss / Python / 作业1

作业1

Topic source
import hashlib
def login(user, password):
    md5 = hashlib.md5()
    md5.update(password.encode('utf-8'))
    if md5.hexdigest() == db[user]:
        return True
    else:
        return False

  • 1

Reply