主页
Python
Python 嵌套 if 语句
demo_nested_login
运行 ❯
×
更改方向
保存代码
更改主题
username = "Emil" password = "python123" is_active = True if username: if password: if is_active: print("Login successful") else: print("Account is not active") else: print("Password required") else: print("Username required")
Loginsuccessful