LIst Comprehensions: References to the Components

前端 未结 4 1989
眼角桃花
眼角桃花 2021-02-15 14:34

In sum: I need to write a List Comprehension in which i refer to list that is being created by the List Comprehension.

This might not be something you need to do every d

4条回答
  •  孤独总比滥情好
    2021-02-15 14:48

    Why don't you simply do:[ some_function(s) for s in set(raw_data) ]

    That should do what you are asking for. Except when you need to preserve the order of the previous list.

提交回复
热议问题