Python三值操作

2024-04-25 02:24:42 发布

您现在位置:Python中文网/ 问答频道 /正文

Possible Duplicate:
Ternary conditional operator in Python

var foo = (test) ? "True" : "False";

在Python中会是什么样子?

使用Python2.7,如果这有区别的话。


Tags: intestfalsetruefoovaroperatorconditional