substantially faster the list comprehension isn' exactly the same as the for loop statement version because it makes new list object (which might matter if there are multiple references to the original list)but it' close enough for most applications and is common and convenient enough approach to merit closer look here list comprehension basics we met the list comprehension briefly in syntacticallyits syntax is derived from construct in set theory notation that applies an operation to each item in setbut you don' have to know set theory to use this tool in pythonmost people find that list comprehension simply looks like backward for loop to get handle on the syntaxlet' dissect the prior section' example in more detaill [ for in llist comprehensions are written in square brackets because they are ultimately way to construct new list they begin with an arbitrary expression that we make upwhich uses loop variable that we make up ( that is followed by what you should now recognize as the header of for loopwhich names the loop variableand an iterable object (for in lto run the expressionpython executes an iteration across inside the interpreterassigning to each item in turnand collects the results of running the items through the expression on the left side the result list we get back is exactly what the list comprehension says-- new list containing for every in technically speakinglist comprehensions are never really required because we can always build up list of expression results manually with for loops that append results as we gores [for in lres append( res [ in factthis is exactly what the list comprehension does internally howeverlist comprehensions are more concise to writeand because this code pattern of building up result lists is so common in python workthey turn out to be very useful in many contexts moreoverdepending on your python and codelist comprehensions might run much faster than manual for loop statements (often roughly twice as fastbecause their iterations are performed at language speed inside the interpreterrather than with manual python code especially for larger data setsthere is often major performance advantage to using this expression list comprehensionsa first detailed look