Painting Blue Code
Simple, self-explanatory code snippets.
2019-03-08
Python - Flatten list of lists using list comprehension
flat = [
y
for
x
in
list_of_lists
for y in
x
]
Credits: https://coderwall.com/p/rcmaea/flatten-a-list-of-lists-in-one-line-in-python
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment