Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
[f for f in (lambda x: x, lambda x: x**2) if f(1) == 1]
它创建一个列表,其中包含(lambda x: x, lambda x: x**2)为参数“1”返回“1”的每个函数。
(lambda x: x, lambda x: x**2)
当然,他们都这样做,所以这个表达有点没用。你在哪里看到的?