>>> a = '' >>> b = 'second' >>> (1 and [a] or [b])[0] '' >>> 1 and a or b 'second' >>> 将a放在[]内保证它为True