📜  python 替换列表中的空值 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:02.140000             🧑  作者: Mango

代码示例1
>>> d = [1,'q','3', None, 'temp']
>>> ['None' if v is None else v for v in d]
[1, 'q', '3', 'None', 'temp']