码迷,mamicode.com
首页 > 其他好文 > 详细

if_else

时间:2017-03-16 22:29:55      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:if_else

判断一个用户,密码是否对


#!/usr/bin/env python

# -*- coding:utf-8 -*-

_username="Lucky"

_password="123"

username=input("username:")

password=input("password:")

if _username==username and _password==password:

    print("welcome to login system!")

else:

    print("invalid username or password!")


2.结果如图:

技术分享

本文出自 “Lucky33” 博客,谢绝转载!

if_else

标签:if_else

原文地址:http://lucky33.blog.51cto.com/3913500/1907320

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!