if else 构建list 2019-07-31 本文已影响0人 你说你要一场 >>> [100 if _==5 else _ for _ in range(10) ] [0, 1, 2, 3, 4, 100, 6, 7, 8, 9]