开发者

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

开发者 https://www.devze.com 2022-12-18 01:38 出处:网络
This question already has answers here: Python for-in loop preceded by a variable [duplicate] (5 answers)
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

精彩评论

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