执行默认变量替换的最简单方法是什么?
x = None ... (some process which may set x) if x is None: use_x = "default" else: use_x = x
有没有办法在一行中写这个?
python
python ×1