标签:bsp use pass == com format invalid nbsp login
通过两个例子学习if else判断
1.if——else
# ifelse 判断 _username = ‘dmr‘ _password = ‘123‘ if username == _username and password == _password: print(‘welcome user {name} login ....‘.format(name=username)) else: print(‘invalid username and password!‘)
2.if——elif——else
# elif age_of_oldboy = 56 guess_age = int(input(‘guessage;‘)) if guess_age == age_of_oldboy: print(‘yes, you get it‘) elif guess_age <age_of_oldboy: print(‘think bigger‘) else: print(‘think smaller‘)
标签:bsp use pass == com format invalid nbsp login
原文地址:http://www.cnblogs.com/sunnnyy37/p/6828208.html