Chalarangelo / 30-seconds-of-python

Short Python code snippets for all your development needs
https://www.30secondsofcode.org/python/p/1
Creative Commons Attribution 4.0 International
8.83k stars 1.26k forks source link

Add list_2d_to_1d snippet #299

Closed d2hf closed 4 years ago

d2hf commented 4 years ago

This snippet is useful for those who are used to numpy's np.array.flatten() method. It is an implementation using python's list object.