Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

double for in python

something = [element for subsequence in sequence for element in subsequence]

This is easy to understand if we break it into parts: [A for B in C]

- A is the item that will be in the resulting list
- B is each item in the collection C
- C is the collection itself.
 
PREVIOUS NEXT
Tagged: #double #python
ADD COMMENT
Topic
Name
9+6 =