It is very anti-Pythonic to do so, and any seasoned Pythonista will give you hell over it. The intermediate list is thrown away after it is created, and it could potentially be very, very large, and therefore expensive to create.
More Related Contents:
- How to create the following lists with list comprehensions? [closed]
- List comprehension vs map
- List comprehension rebinds names even after scope of comprehension. Is this right?
- Creating a dictionary from a csv file?
- Double Iteration in List Comprehension
- List vs generator comprehension speed with join function [duplicate]
- Nested For Loops Using List Comprehension
- How can I do assignments in a list comprehension?
- yield in list comprehensions and generator expressions
- How can I use a conditional expression (expression with if and else) in a list comprehension? [duplicate]
- Split a list into nested lists on a value
- How to frame two for loops in list comprehension python
- How to return a subset of a list that matches a condition [duplicate]
- In Python, is it better to use list comprehensions or for-each loops?
- Why results of map() and list comprehension are different? [duplicate]
- The truth value of an array with more than one element is ambigous when trying to index an array
- list.extend and list comprehension [duplicate]
- Comprehension on a nested iterables?
- remove None value from a list without removing the 0 value
- How can I use list comprehensions to process a nested list?
- How can I collect the results of a repeated calculation in a list, dictionary etc. (make a copy of a list with each element modified)?
- How can I get around declaring an unused variable in a list comprehension?
- How can I create a list of elements from an iterator (convert the iterator to a list)?
- How to remove duplicate items from a list using list comprehension? [duplicate]
- python list comprehension double for
- Are list comprehensions syntactic sugar for `list(generator expression)` in Python 3?
- sum each value in a list of tuples
- Duplicate elements in a list [duplicate]
- Appending to a list comprehension in Python returns None [duplicate]
- Optimal method to find the max of sublist items within list