簡單login-py基礎

阅读: 481 | 文章分类: Python | Tag:

> 知識點:getpass模塊 ``` import getpass user_name = 'gabe' user_pwd = '123123' user = input('user:') if user == user_name : passwd = getpass.getpass('pwd:') if passwd == user_pwd : print('access') else : print('error') else : print('no user',user) ```