最佳答案
do you know if Python supports some keyword or expression like in C++ to return values based on if
condition, all in the same line (The C++ if
expressed with the question mark ?
)
// C++
value = ( a > 10 ? b : c )