1. 程式人生 > >python 3 if else 流程判斷示例

python 3 if else 流程判斷示例

if python3 else

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

_username = ‘name‘
_passwd = ‘abcd1234‘

username = input("username:")
passwd = input("passwd:")

if _username == username and _passwd == passwd:
    print("Welcome user {name} login "  .format(name=username))
else:
    print("username or password is wrong")


本文出自 “Dr小白” 博客,請務必保留此出處http://metis.blog.51cto.com/1203503/1953666

python 3 if else 流程判斷示例