1 if else 流程判断 强制缩进
_usename = ""
_password = ""
if _usename == username and _password == password:
print("welcome user {name} login ...".format(name==username))
else:
print ("invalid username or password")
父级代码顶格写,不能缩进
2 while 循环 while ... elif
count = 0
while True
print("count:" count)
count +=1
elif :
..........
else:
break
时间: 2024-11-25 09:02:46