x = condition ? a : b 在Python为: x = a if condition else b ref: https://blog.csdn.net/u011973222/article/details/79928379