📜  python根据条件将列表转换为真假 - Python代码示例

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

代码示例1
# Basic syntax:
boolean_list = [True if x == 'condition' else False for x in your_list]
# This converts a list to True/False based on the condition specified