Python branch structure study notes

Biantennary structure in a compact form:
<Expression 1> if <condition> the else <Expression 2>

a=eval(input());
print("猜{}了".format("对" if a==99 else "错"))
99
猜对了
Released three original articles · won praise 0 · Views 81

Guess you like

Origin blog.csdn.net/yanfang7722/article/details/104102016