开发者

What is the name for [x for x in some_list] type of construct in python? [duplicate]

This question already has answers here: Python for-in loop preceded by a variable [duplicate] (5 answers) 开发者_StackOverflow Closed 8 years ago.

Couldn't really find it, but probably it's me not knowing how to search properly :(

Just wanted to find out what the name is for:

[x for x in some_list]

type of construct?


It's a list comprehension

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜