• 2022-07-28
    已知列表lst=[ [‘苹果’,’红色’] , [‘葡萄’,’紫色’] , [‘草莓’,’红色’] ],则以下能够获取所有水果名称列表的表达式是:
    A: [ x[0] for x in lst ]
    B: [ x[1] for x in lst ]
    C: [ x(0) for x in lst ]
    D: [ x for x in lst if x==’水果’]