Coderwall
Ruby
Python
JavaScript
Front-End
Tools
iOS
More
Tips
Ruby
Python
JavaScript
Front-End
Tools
iOS
PHP
Android
.NET
Java
Jobs
Jobs
Sign In or Up
Joined July 2015
·
AlexSnet
Alex Snet
Russia, Moscow
·
·
0 Protips
1 Comments
Posted to
Flatten a list of lists in one line in Python
over 1 year ago
Good way:
import itertools flattened_list = list(itertools.chain(*list_of_lists))
;)
Achievements
1 Karma
0 Total ProTip Views
Good way:
;)